Skip to content

Commit

Permalink
src/parallel/decompose: Corrected handling of sentinel files
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Bainbridge committed May 24, 2024
1 parent 81dd264 commit 8b11d6a
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 38 deletions.
2 changes: 1 addition & 1 deletion src/parallel/decompose/metis/Allwmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis`
then
. $settings
echo " using METIS_ARCH_PATH=$METIS_ARCH_PATH"
if [ -r $METIS_ARCH_PATH/lib/libmetis.so ]
if [ -r "$METIS_ARCH_PATH/lib/libmetis.so" ]
then
wmake $targetType
fi
Expand Down
12 changes: 1 addition & 11 deletions src/parallel/decompose/parMetis/Allwclean
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory

. $WM_PROJECT_DIR/wmake/scripts/AllwmakeMpiLib

# Get PARMETIS_VERSION, PARMETIS_ARCH_PATH
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/parMetis`
then
. $settings
echo " using PARMETIS_ARCH_PATH=$PARMETIS_ARCH_PATH"
wcleanMpiLib $PARMETIS_VERSION parMetisDecomp
else
echo
echo " Error: no config.sh/parMetis settings"
echo
fi
wcleanMpiLib

#------------------------------------------------------------------------------
6 changes: 4 additions & 2 deletions src/parallel/decompose/parMetis/Allwmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/parMetis`
then
. $settings
echo " using PARMETIS_ARCH_PATH=$PARMETIS_ARCH_PATH"
if [ -r $PARMETIS_ARCH_PATH/lib/libparmetis.so ]
if [ -r "$PARMETIS_ARCH_PATH/lib/libparmetis.so" ]
then
wmakeMpiLib $PARMETIS_VERSION
wmakeMpiLib $PARMETIS_VERSION parMetis
else
echo " skipping parMetis"
fi
else
echo
Expand Down
12 changes: 1 addition & 11 deletions src/parallel/decompose/ptscotch/Allwclean
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory

. $WM_PROJECT_DIR/wmake/scripts/AllwmakeMpiLib

# Get SCOTCH_VERSION, SCOTCH_ARCH_PATH
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch`
then
. $settings
echo " using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
wcleanMpiLib $SCOTCH_VERSION
else
echo
echo " Error: no config.sh/scotch settings"
echo
fi
wcleanMpiLib

#------------------------------------------------------------------------------
4 changes: 3 additions & 1 deletion src/parallel/decompose/ptscotch/Allwmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ then
&& [ -n "$WM_MPLIB" ] \
&& [ -d "$FOAM_LIBBIN/$FOAM_MPI" ]
then
wmakeMpiLib $SCOTCH_VERSION
wmakeMpiLib $SCOTCH_VERSION ptscotch
else
echo " skipping ptscotch"
fi
else
echo
Expand Down
2 changes: 1 addition & 1 deletion src/parallel/decompose/zoltan/Allwclean
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory

. $WM_PROJECT_DIR/wmake/scripts/AllwmakeMpiLib

wcleanMpiLib 3.90
wcleanMpiLib

#------------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions src/parallel/decompose/zoltan/Allwmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ cd ${0%/*} || exit 1 # Run from this directory

. $WM_PROJECT_DIR/wmake/scripts/AllwmakeMpiLib

# Get ZOLTAN_VERSION, ZOLTAN_ARCH_PATH
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan`
then
. $settings
echo " using ZOLTAN_ARCH_PATH=$ZOLTAN_ARCH_PATH"

if [ -n "$ZOLTAN_ARCH_PATH" ] \
&& [ -r "$ZOLTAN_ARCH_PATH/include/zoltan.h" ] \
&& { \
[ -r "$FOAM_EXT_LIBBIN/$FOAM_MPI/libzoltan.a" ] \
|| [ -r "$ZOLTAN_ARCH_PATH/lib/libzoltan.a" ]; \
}
then
wmakeMpiLib $ZOLTAN_VERSION
wmakeMpiLib $ZOLTAN_VERSION zoltan
else
echo " skipping zoltan"
fi
Expand Down
13 changes: 4 additions & 9 deletions wmake/scripts/AllwmakeMpiLib
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ wmakeMpiLib()
WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
whichmpi="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$FOAM_MPI"
whichtarget="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$version"
[ -e "$whichmpi" -a -e "$whichtarget" ] || wclean -noLnInclude $libName
echo "wmake $targetType $libName"
wmake $targetType $libName
[ -e "$whichmpi" -a -e "$whichtarget" ] || wclean -noLnInclude
echo "wmake $targetType"
wmake $targetType
touch "$whichmpi" "$whichtarget"
)
}
Expand All @@ -56,13 +56,8 @@ wmakeMpiLib()
wcleanMpiLib()
{
(
version="$1"
libName="$2"

WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
whichmpi="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$FOAM_MPI"
whichtarget="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$version"
wclean $libName
wclean
)
}

Expand Down

0 comments on commit 8b11d6a

Please sign in to comment.