Commit b6465899 authored by Mark Olesen's avatar Mark Olesen
Browse files

COMP: add sentinels to catch mpi or scotch version changes when compiling

parent 22fae652
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
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
case "$WM_MPLIB" in
......@@ -11,9 +34,7 @@ case "$WM_MPLIB" in
echo
echo "Note: ignore spurious warnings about missing mpicxx.h headers"
echo
set -x
# force compilation into qualified directory
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake $makeType mpi
wmakeMpiLib mpi
;;
#GAMMA)
......
......@@ -3,8 +3,7 @@ cd ${0%/*} || exit 1 # run from this directory
makeType=${1:-libso}
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
if [ -f "$settings" ]
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
then
. $settings
echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
......@@ -13,21 +12,45 @@ else
echo "Error: no apps/scotch/bashrc settings"
echo
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
wmakeLnInclude decompositionMethods
wmake $makeType scotchDecomp
if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ]
if [ -n "$SCOTCH_ARCH_PATH" ]
then
(
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB
wmake $makeType ptscotchDecomp
)
wmake $makeType scotchDecomp
[ -d "$FOAM_LIBBIN/$FOAM_MPI" ] && wmakeMpiLib ptscotchDecomp
else
echo
echo "Skipping scotchDecomp (ptscotchDecomp)"
echo
fi
wmake $makeType decompositionMethods
# ----------------------------------------------------------------- end-of-file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment