Skip to content
Snippets Groups Projects
Commit 3a1113e5 authored by Henry's avatar Henry
Browse files

Updated to avoid creating PINC and PLIBS environment variables

parent ee3fd4c4
Branches
Tags
No related merge requests found
......@@ -391,22 +391,12 @@ case SYSTEMOPENMPI:
# Use the system installed openmpi, get library directory via mpicc
setenv FOAM_MPI openmpi-system
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
setenv PINC "`mpicc --showme:compile`"
setenv PLIBS "`mpicc --showme:link`"
set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
set libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
# Bit of a hack: strip off 'lib' and hope this is the path to openmpi
# include files and libraries.
setenv MPI_ARCH_PATH "${libDir:h}"
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using system installed MPI:"
echo " compile flags : $PINC"
echo " link flags : $PLIBS"
echo " libmpi dir : $libDir"
endif
_foamAddLib $libDir
unset libDir
breaksw
......
......@@ -418,23 +418,12 @@ SYSTEMOPENMPI)
# Use the system installed openmpi, get library directory via mpicc
export FOAM_MPI=openmpi-system
# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
export PINC="`mpicc --showme:compile`"
export PLIBS="`mpicc --showme:link`"
libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
# Bit of a hack: strip off 'lib' and hope this is the path to openmpi
# include files and libraries.
export MPI_ARCH_PATH="${libDir%/*}"
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using system installed MPI:" 1>&2
echo " compile flags : $PINC" 1>&2
echo " link flags : $PLIBS" 1>&2
echo " libmpi dir : $libDir" 1>&2
fi
_foamAddLib $libDir
unset libDir
;;
......
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