mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: improve robustness/flexibility for MPI config handling
- use orte-info to determine prefix/libdir for openmpi. This removes a run-time dependency on mpicc, which is actually only needed for building with MPI (not running with MPI). The corresponding openmpi devel package (deb/rpm) will not necessarily be installed on a particular system. - retain mpicc logic if the new logic using orte-info does not deliver an answer. Final fallback to using 'orterun' to infer prefix/libdir. - Additional logic for intel and msmpi to make it easier to locate these vendor packages within ThirdParty (ie, under ThirdParty/opt/...) CONFIG: improve robustness - add check for absolute path when adding PATH/LD_LIBRARY_PATH etc. - prefix more variables with '_foam*' to prevent accidental overwrite of userspace shell variables when sourcing
This commit is contained in:
@ -30,7 +30,7 @@
|
||||
setenv FOAM_API `$WM_PROJECT_DIR/bin/foamEtcFile -show-api`
|
||||
|
||||
# The installation parent directory
|
||||
set prefixDir="${WM_PROJECT_DIR:h}"
|
||||
set _foamPrefixDir="${WM_PROJECT_DIR:h}"
|
||||
|
||||
# Load shell "functions" (actually aliases)
|
||||
source "$WM_PROJECT_DIR/etc/config.csh/functions"
|
||||
@ -52,16 +52,16 @@ if ( -e "$WM_PROJECT_DIR/ThirdParty" ) then
|
||||
setenv WM_THIRD_PARTY_DIR "$WM_PROJECT_DIR/ThirdParty"
|
||||
else
|
||||
_foamEcho "Locating ThirdParty directory"
|
||||
foreach foundDir (\
|
||||
"$prefixDir/ThirdParty-$WM_PROJECT_VERSION" \
|
||||
"$prefixDir/ThirdParty-v$FOAM_API" \
|
||||
"$prefixDir/ThirdParty-$FOAM_API" \
|
||||
"$prefixDir/ThirdParty-common" \
|
||||
foreach _foamFoundDir (\
|
||||
"$_foamPrefixDir/ThirdParty-$WM_PROJECT_VERSION" \
|
||||
"$_foamPrefixDir/ThirdParty-v$FOAM_API" \
|
||||
"$_foamPrefixDir/ThirdParty-$FOAM_API" \
|
||||
"$_foamPrefixDir/ThirdParty-common" \
|
||||
)
|
||||
_foamEcho "... $foundDir"
|
||||
if ( -d "$foundDir" ) then
|
||||
if ( -f "$foundDir/Allwmake" || -d "$foundDir/platforms" ) then
|
||||
setenv WM_THIRD_PARTY_DIR "$foundDir"
|
||||
_foamEcho "... $_foamFoundDir"
|
||||
if ( -d "$_foamFoundDir" ) then
|
||||
if ( -f "$_foamFoundDir/Allwmake" || -d "$_foamFoundDir/platforms" ) then
|
||||
setenv WM_THIRD_PARTY_DIR "$_foamFoundDir"
|
||||
break
|
||||
else
|
||||
_foamEcho " does not have Allwmake or platforms/"
|
||||
@ -239,6 +239,6 @@ unalias _foamAddLib
|
||||
unalias _foamAddLibAuto
|
||||
|
||||
# Variables (done as final statement for a clean exit code)
|
||||
unset cleaned foamOldDirs foundDir prefixDir
|
||||
unset cleaned foamOldDirs _foamFoundDir _foamPrefixDir
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user