mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- provide dedicated detection 'have_ptscotch' function that can be used after the 'have_scotch' function. It sets the PTSCOTCH_ARCH_PATH, PTSCOTCH_INC_DIR, PTSCOTCH_LIB_DIR and helps when the serial and parallel versions are located with different logic.
66 lines
1.6 KiB
Bash
Executable File
66 lines
1.6 KiB
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # Run from this directory
|
|
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
|
. $WM_PROJECT_DIR/wmake/scripts/have_kahip
|
|
. $WM_PROJECT_DIR/wmake/scripts/have_metis
|
|
. $WM_PROJECT_DIR/wmake/scripts/have_scotch
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
: ${FOAM_EXT_LIBBIN:=/usr/lib$WM_COMPILER_LIB_ARCH} # Extra safety?
|
|
export FOAM_EXT_LIBBIN
|
|
|
|
#
|
|
# Define how to create an mpi-versioned library of $targetType
|
|
# compile into qualified directory
|
|
# use sentinel file(s) to handle version changes
|
|
#
|
|
wmakeMpiLib()
|
|
{
|
|
local decompName="$1"
|
|
local objectsDir
|
|
shift
|
|
for libName
|
|
do
|
|
(
|
|
WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
|
|
objectsDir="$WM_PROJECT_DIR/build/$WM_OPTIONS/src/parallel/decompose/$libName"
|
|
whichmpi="$objectsDir/using:$FOAM_MPI"
|
|
whichdecomp="$objectsDir/using:$decompName"
|
|
[ -e "$whichmpi" -a -e "$whichdecomp" ] || wclean $libName
|
|
echo "wmake $targetType $libName"
|
|
wmake $targetType $libName
|
|
mkdir -p "$objectsDir"
|
|
touch "$whichdecomp" "$whichmpi"
|
|
)
|
|
done
|
|
}
|
|
|
|
wmakeLnInclude -u decompositionMethods
|
|
|
|
if have_scotch
|
|
then
|
|
wmake $targetType scotchDecomp
|
|
|
|
if have_ptscotch
|
|
then
|
|
wmakeMpiLib "$SCOTCH_VERSION" ptscotchDecomp
|
|
fi
|
|
fi
|
|
|
|
if have_metis
|
|
then
|
|
wmake $targetType metisDecomp
|
|
fi
|
|
|
|
if have_kahip
|
|
then
|
|
wmake $targetType kahipDecomp
|
|
fi
|
|
|
|
wmake $targetType decompositionMethods
|
|
wmake $targetType decompose
|
|
|
|
|
|
#------------------------------------------------------------------------------
|