etc/bashrc, etc/config.sh:
- "$FOAM_USER_APPBIN" and "$FOAM_USER_LIBBIN" have been added to "foamOldDirs" in "etc/bashrc" and "etc/config.sh/unset" - "$OPAL_PREFIX" is now undefined in the option "SYSTEMOPENMPI" within "etc/config.sh/mpi", but only if the path defined in this variable is cleaned when using "foamCleanPath". - "$OPAL_PREFIX" is now also conditionally undefined in "etc/config.sh/unset" when the path is picked up by "foamCleanPath". Patch contributed by Bruno Santos Resolved bug-report http://bugs.openfoam.org/view.php?id=2210
This commit is contained in:
parent
f75e69b5f7
commit
c482490a60
@ -104,7 +104,8 @@ export FOAM_SIGFPE=
|
||||
################################################################################
|
||||
|
||||
# The old dirs to be cleaned from the environment variables
|
||||
foamOldDirs="$WM_PROJECT_DIR $WM_THIRD_PARTY_DIR $HOME/$WM_PROJECT/$USER \
|
||||
foamOldDirs="$WM_PROJECT_DIR $WM_THIRD_PARTY_DIR \
|
||||
$HOME/$WM_PROJECT/$USER $FOAM_USER_APPBIN $FOAM_USER_LIBBIN \
|
||||
$WM_PROJECT_SITE $FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN"
|
||||
|
||||
# Location of installation
|
||||
|
@ -37,6 +37,12 @@ SYSTEMOPENMPI)
|
||||
# Use the system installed openmpi, get library directory via mpicc
|
||||
export FOAM_MPI=openmpi-system
|
||||
|
||||
# Undefine OPAL_PREFIX if set to one of the paths on foamOldDirs
|
||||
if [ -z "$($foamClean "$OPAL_PREFIX" "$foamOldDirs")" ]
|
||||
then
|
||||
unset OPAL_PREFIX
|
||||
fi
|
||||
|
||||
libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
||||
|
||||
# Bit of a hack: strip off 'lib' and hope this is the path to openmpi
|
||||
|
@ -34,7 +34,8 @@ foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
|
||||
[ -f "$foamClean" -a -x "$foamClean" ] || unset foamClean
|
||||
|
||||
# The old dirs to be cleaned from the environment variables
|
||||
foamOldDirs="$WM_PROJECT_DIR $WM_THIRD_PARTY_DIR $HOME/$WM_PROJECT/$USER \
|
||||
foamOldDirs="$WM_PROJECT_DIR $WM_THIRD_PARTY_DIR \
|
||||
$HOME/$WM_PROJECT/$USER $FOAM_USER_APPBIN $FOAM_USER_LIBBIN \
|
||||
$WM_PROJECT_SITE $FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN $ParaView_DIR"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -101,7 +102,12 @@ unset FOAM_UTILITIES
|
||||
|
||||
unset MPI_ARCH_PATH
|
||||
unset MPI_BUFFER_SIZE
|
||||
unset OPAL_PREFIX
|
||||
|
||||
# Undefine OPAL_PREFIX if set to one of the paths on foamOldDirs
|
||||
if [ -z "$($foamClean "$OPAL_PREFIX" "$foamOldDirs")" ]
|
||||
then
|
||||
unset OPAL_PREFIX
|
||||
fi
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user