Commit 473e000b authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: enable MPI library variants (#1153)

- in addition to managing different vendors and versions, it may also
  be necessary or desirable to have a particular variant
  (eg, profiling, release, etc).

  Devise a new meaningful name for the variant and create a
  corresponding wmake rule.

  Eg, SYSTEMOPENMPI-profiling with a corresponding
      "wmake/rules/linux64Gcc/mplibSYSTEMOPENMPI-profiling" file
  that has suitable content for your system.

CONFIG: intel-mpi use intel64/ paths only for config and wmake rules (#1153)

- previously adjusted the config files, but missed the changes
  required for the wmake rules too.

  Now simply migrate to using  "intel64/{include,bin,lib}"
  instead of the older naming  "{include,bin,lib}64"

  These changes work since at least intel-mpi 2015 (5.x), but possibly
  earlier as well
parent 5b2300a8
api=1812
patch=190123
patch=190129
......@@ -93,6 +93,7 @@ export WM_COMPILE_OPTION=Opt
# [WM_MPLIB] - MPI implementation:
# = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPI | MPICH | MPICH-GM |
# HPMPI | CRAY-MPICH | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI
# Also possible to use INTELMPI-xyz etc and define your own wmake rule
export WM_MPLIB=SYSTEMOPENMPI
......
......@@ -33,7 +33,7 @@ unsetenv MPI_ARCH_PATH MPI_HOME
setenv FOAM_MPI dummy # Fallback value
switch ("$WM_MPLIB")
case SYSTEMOPENMPI:
case SYSTEMOPENMPI*:
# The system installed openmpi, locations discovery via mpicc.
setenv FOAM_MPI openmpi-system
_foamEtc -config openmpi-system # <- Adjustments (optional)
......@@ -52,7 +52,7 @@ case SYSTEMOPENMPI:
endif
breaksw
case OPENMPI:
case OPENMPI*:
setenv FOAM_MPI openmpi-1.10.4
_foamEtc -config openmpi # <- Adjustments (optional)
......@@ -243,7 +243,7 @@ case SGIMPI:
_foamAddLib $MPI_ARCH_PATH/lib
breaksw
case INTELMPI:
case INTELMPI*:
if ( $?I_MPI_ROOT ) then
# I_MPI_ROOT: The Intel MPI Library installation directory
......@@ -300,14 +300,8 @@ case INTELMPI:
echo " Currently using '$MPI_ARCH_PATH'"
endif
# Newer versions (5.0.3 or earlier?) with intel64/bin ...
if ( -d "$MPI_ARCH_PATH/intel64/bin" ) then
_foamAddPath "$MPI_ARCH_PATH/intel64/bin"
_foamAddLib "$MPI_ARCH_PATH/intel64/lib"
else
_foamAddPath "$MPI_ARCH_PATH/bin64"
_foamAddLib "$MPI_ARCH_PATH/lib64"
endif
_foamAddPath "$MPI_ARCH_PATH/intel64/bin"
_foamAddLib "$MPI_ARCH_PATH/intel64/lib"
breaksw
endsw
......
......@@ -33,7 +33,7 @@ unset MPI_ARCH_PATH MPI_HOME
export FOAM_MPI=dummy # Fallback value
case "$WM_MPLIB" in
SYSTEMOPENMPI)
SYSTEMOPENMPI*)
# The system installed openmpi, locations discovery via mpicc.
export FOAM_MPI=openmpi-system
......@@ -58,7 +58,7 @@ SYSTEMOPENMPI)
fi
;;
OPENMPI)
OPENMPI*)
export FOAM_MPI=openmpi-1.10.4
_foamEtc -config openmpi # <- Adjustments (optional)
......@@ -261,7 +261,7 @@ SGIMPI)
_foamAddLib $MPI_ARCH_PATH/lib
;;
INTELMPI)
INTELMPI*)
if [ -n "$I_MPI_ROOT" ]
then
# I_MPI_ROOT: The Intel MPI Library installation directory
......@@ -303,15 +303,8 @@ INTELMPI)
export FOAM_MPI MPI_ARCH_PATH
# Newer versions (5.0.3 or earlier?) with intel64/bin ...
if [ -d "$MPI_ARCH_PATH/intel64/bin" ]
then
_foamAddPath "$MPI_ARCH_PATH/intel64/bin"
_foamAddLib "$MPI_ARCH_PATH/intel64/lib"
else
_foamAddPath "$MPI_ARCH_PATH/bin64"
_foamAddLib "$MPI_ARCH_PATH/lib64"
fi
_foamAddPath "$MPI_ARCH_PATH/intel64/bin"
_foamAddLib "$MPI_ARCH_PATH/intel64/lib"
;;
esac
......
......@@ -95,6 +95,7 @@ setenv WM_COMPILE_OPTION Opt
# [WM_MPLIB] - MPI implementation:
# = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPI | MPICH | MPICH-GM |
# HPMPI | CRAY-MPICH | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI
# Also possible to use INTELMPI-xyz etc and define your own wmake rule
setenv WM_MPLIB SYSTEMOPENMPI
......
PFLAGS = -DMPICH_SKIP_MPICXX
PINC = -isystem $(MPI_ARCH_PATH)/include64
PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi
PINC = -isystem $(MPI_ARCH_PATH)/intel64/include
PLIBS = -L$(MPI_ARCH_PATH)/intel64/lib -lmpi
PFLAGS = -DMPICH_SKIP_MPICXX
PINC = -isystem $(MPI_ARCH_PATH)/include64
PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi
PINC = -isystem $(MPI_ARCH_PATH)/intel64/include
PLIBS = -L$(MPI_ARCH_PATH)/intel64/lib -lmpi
PFLAGS = -DMPICH_SKIP_MPICXX
PINC = -isystem $(MPI_ARCH_PATH)/include64
PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi
PINC = -isystem $(MPI_ARCH_PATH)/intel64/include
PLIBS = -L$(MPI_ARCH_PATH)/intel64/lib -lmpi
PFLAGS = -DMPICH_SKIP_MPICXX
PINC = -isystem $(MPI_ARCH_PATH)/include64
PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi
PINC = -isystem $(MPI_ARCH_PATH)/intel64/include
PLIBS = -L$(MPI_ARCH_PATH)/intel64/lib -lmpi
PFLAGS = -DMPICH_SKIP_MPICXX
PINC = -isystem $(MPI_ARCH_PATH)/include64
PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi
PINC = -isystem $(MPI_ARCH_PATH)/intel64/include
PLIBS = -L$(MPI_ARCH_PATH)/intel64/lib -lmpi
PFLAGS = -DMPICH_SKIP_MPICXX
PINC = -isystem $(MPI_ARCH_PATH)/include64
PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi
PINC = -isystem $(MPI_ARCH_PATH)/intel64/include
PLIBS = -L$(MPI_ARCH_PATH)/intel64/lib -lmpi
PFLAGS = -DMPICH_SKIP_MPICXX
PINC = -isystem $(MPI_ARCH_PATH)/include64
PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi
PINC = -isystem $(MPI_ARCH_PATH)/intel64/include
PLIBS = -L$(MPI_ARCH_PATH)/intel64/lib -lmpi
Markdown is supported
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