mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: add sentinels to catch mpi or scotch version changes when compiling
This commit is contained in:
@ -1,8 +1,31 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
makeType=${1:-libso}
|
makeType=${1:-libso}
|
||||||
set -x
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# define how to create an mpi-versioned library of $makeType
|
||||||
|
# compile into qualified directory
|
||||||
|
# use sentinel file to handle version changes
|
||||||
|
#
|
||||||
|
wmakeMpiLib()
|
||||||
|
{
|
||||||
|
set +x
|
||||||
|
for libName
|
||||||
|
do
|
||||||
|
(
|
||||||
|
WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
|
||||||
|
whichmpi="$libName/Make/$WM_OPTIONS/using:$FOAM_MPI"
|
||||||
|
[ -e "$whichmpi" ] || wclean $libName
|
||||||
|
echo "wmake $makeType $libName"
|
||||||
|
wmake $makeType $libName
|
||||||
|
touch "$whichmpi"
|
||||||
|
)
|
||||||
|
done
|
||||||
|
set -x
|
||||||
|
}
|
||||||
|
|
||||||
|
set -x
|
||||||
wmake $makeType dummy
|
wmake $makeType dummy
|
||||||
|
|
||||||
case "$WM_MPLIB" in
|
case "$WM_MPLIB" in
|
||||||
@ -11,9 +34,7 @@ case "$WM_MPLIB" in
|
|||||||
echo
|
echo
|
||||||
echo "Note: ignore spurious warnings about missing mpicxx.h headers"
|
echo "Note: ignore spurious warnings about missing mpicxx.h headers"
|
||||||
echo
|
echo
|
||||||
set -x
|
wmakeMpiLib mpi
|
||||||
# force compilation into qualified directory
|
|
||||||
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake $makeType mpi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
#GAMMA)
|
#GAMMA)
|
||||||
|
|||||||
@ -3,8 +3,7 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
makeType=${1:-libso}
|
makeType=${1:-libso}
|
||||||
|
|
||||||
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
|
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
|
||||||
settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
|
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
|
||||||
if [ -f "$settings" ]
|
|
||||||
then
|
then
|
||||||
. $settings
|
. $settings
|
||||||
echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
|
echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
|
||||||
@ -13,21 +12,45 @@ else
|
|||||||
echo "Error: no apps/scotch/bashrc settings"
|
echo "Error: no apps/scotch/bashrc settings"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# define how to create an mpi-versioned library of $makeType
|
||||||
|
# compile into qualified directory
|
||||||
|
# use sentinel file to handle version changes
|
||||||
|
#
|
||||||
|
wmakeMpiLib()
|
||||||
|
{
|
||||||
|
set +x
|
||||||
|
for libName
|
||||||
|
do
|
||||||
|
(
|
||||||
|
WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
|
||||||
|
whichmpi="$libName/Make/$WM_OPTIONS/using:$FOAM_MPI"
|
||||||
|
whichscotch="$libName/Make/$WM_OPTIONS/using:$SCOTCH_VERSION"
|
||||||
|
[ -e "$whichmpi" -a -e "$whichscotch" ] || wclean $libName
|
||||||
|
echo "wmake $makeType $libName"
|
||||||
|
wmake $makeType $libName
|
||||||
|
touch "$whichmpi" "$whichscotch"
|
||||||
|
)
|
||||||
|
done
|
||||||
|
set -x
|
||||||
|
}
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmakeLnInclude decompositionMethods
|
wmakeLnInclude decompositionMethods
|
||||||
|
|
||||||
wmake $makeType scotchDecomp
|
if [ -n "$SCOTCH_ARCH_PATH" ]
|
||||||
|
|
||||||
if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ]
|
|
||||||
then
|
then
|
||||||
(
|
wmake $makeType scotchDecomp
|
||||||
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB
|
[ -d "$FOAM_LIBBIN/$FOAM_MPI" ] && wmakeMpiLib ptscotchDecomp
|
||||||
wmake $makeType ptscotchDecomp
|
else
|
||||||
)
|
echo
|
||||||
|
echo "Skipping scotchDecomp (ptscotchDecomp)"
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wmake $makeType decompositionMethods
|
wmake $makeType decompositionMethods
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
Reference in New Issue
Block a user