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:
@ -96,7 +96,7 @@ case MSYS*:
|
||||
if ( "$WM_COMPILER" == Gcc ) setenv WM_COMPILER Mingw
|
||||
setenv WM_COMPILER_LIB_ARCH 64 # Consistent with linux64Mingw
|
||||
echo "openfoam: windows support (mingw64) is runtime only"
|
||||
;;
|
||||
breaksw
|
||||
|
||||
case SunOS*:
|
||||
setenv WM_ARCH solaris64
|
||||
@ -146,12 +146,12 @@ setenv FOAM_USER_APPBIN "$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin"
|
||||
setenv FOAM_USER_LIBBIN "$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib"
|
||||
|
||||
# Prepend wmake to the path - not required for runtime-only environment
|
||||
set foundDir="${WM_PROJECT_DIR}/wmake"
|
||||
set _foamFoundDir="${WM_PROJECT_DIR}/wmake"
|
||||
if ( $?WM_DIR ) then
|
||||
if ( -d "${WM_DIR}" ) set foundDir="${WM_DIR}"
|
||||
if ( -d "${WM_DIR}" ) set _foamFoundDir="${WM_DIR}"
|
||||
endif
|
||||
if ( -d "$foundDir" ) then
|
||||
setenv PATH "${foundDir}:${PATH}"
|
||||
if ( -d "$_foamFoundDir" ) then
|
||||
setenv PATH "${_foamFoundDir}:${PATH}"
|
||||
else
|
||||
unsetenv WM_DIR
|
||||
endif
|
||||
@ -317,7 +317,7 @@ endsw
|
||||
|
||||
# Cleanup
|
||||
# ~~~~~~~
|
||||
unset archDir siteDir foundDir archOption
|
||||
unset archOption archDir siteDir _foamFoundDir
|
||||
unset gcc_version gccDir
|
||||
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
|
||||
unset clang_version clangDir
|
||||
|
||||
Reference in New Issue
Block a user