diff --git a/etc/config.sh/zoltan b/etc/config.sh/zoltan new file mode 100644 index 0000000000..d5264f41c6 --- /dev/null +++ b/etc/config.sh/zoltan @@ -0,0 +1,40 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | Website: https://openfoam.org +# \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# File +# etc/config.sh/zoltan +# +# Description +# Setup file for zoltan include/libraries. +# Sourced during wmake process only. +# +# Note +# A csh version is not needed, since the values here are only sourced +# during the wmake process +# +#------------------------------------------------------------------------------ + +export ZOLTAN_VERSION=Zoltan-3.90 +export ZOLTAN_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$ZOLTAN_VERSION + +#------------------------------------------------------------------------------ diff --git a/src/renumber/Allwmake b/src/renumber/Allwmake index fca882bd3b..f6535ac090 100755 --- a/src/renumber/Allwmake +++ b/src/renumber/Allwmake @@ -8,11 +8,21 @@ cd ${0%/*} || exit 1 # Run from this directory # installation problems on a range of legacy systems. # wmake $targetType SloanRenumber -if [ -n "$ZOLTAN_ARCH_PATH" ] +if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan` then - wmake $targetType zoltanRenumber + . $settings + echo " using ZOLTAN_ARCH_PATH=$ZOLTAN_ARCH_PATH" + + if [ -n "$ZOLTAN_ARCH_PATH" ] + then + wmake $targetType zoltanRenumber + else + echo " skipping zoltanRenumber" + fi else - echo " skipping zoltanRenumber" + echo + echo " Error: no config.sh/zoltan settings" + echo fi wmake $targetType renumberMethods diff --git a/src/renumber/zoltanRenumber/Make/options b/src/renumber/zoltanRenumber/Make/options index 9062f4faf4..5ea1b43860 100644 --- a/src/renumber/zoltanRenumber/Make/options +++ b/src/renumber/zoltanRenumber/Make/options @@ -4,9 +4,7 @@ EXE_INC = \ $(PFLAGS) $(PINC) \ -I$(FOAM_SRC)/Pstream/mpi/lnInclude \ -I$(FOAM_SRC)/renumber/renumberMethods/lnInclude \ - -I$(ZOLTAN_ARCH_PATH)/include/ \ - -I$(LIB_SRC)/meshTools/lnInclude + -I$(ZOLTAN_ARCH_PATH)/include LIB_LIBS = \ - -lmeshTools \ - -L${ZOLTAN_ARCH_PATH}/lib64 -lzoltan + -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lzoltan diff --git a/src/renumber/zoltanRenumber/zoltanRenumber.H b/src/renumber/zoltanRenumber/zoltanRenumber.H index 102214f427..ef28b19942 100644 --- a/src/renumber/zoltanRenumber/zoltanRenumber.H +++ b/src/renumber/zoltanRenumber/zoltanRenumber.H @@ -29,22 +29,13 @@ Description Note: Zoltan methods do not support serial operation. - Zoltan install: - - in your ~/.bashrc: - export ZOLTAN_ARCH_PATH=\ - $WM_THIRD_PARTY_DIR/platforms/linux64Gcc/Zoltan-XXX - - unpack into $WM_THIRD_PARTY_DIR - - cd Zoltan_XXX - - mkdir build - - cd build - - export CCFLAGS="-fPIC" - - export CXXFLAGS="-fPIC" - - export CFLAGS="-fPIC" - - ../configure \ - --prefix=$ZOLTAN_ARCH_PATH \ - --with-ccflags=-fPIC --with-cxxflags=-fPIC - - make everything - - make install +Usage + + To select the Zoltan Hilbert space filling curves renumber method add the + following entries to renumberMeshDict: + + method zoltan; + libs ("libzoltanRenumber.so"); SourceFiles zoltanRenumber.C