diff --git a/etc/config.csh/mpi b/etc/config.csh/mpi index 4159e8717e..a057d4350e 100644 --- a/etc/config.csh/mpi +++ b/etc/config.csh/mpi @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -142,6 +142,14 @@ case MPICH-GM: _foamAddLib $GM_LIB_PATH breaksw +case MVAPICH2: + setenv FOAM_MPI mvapich2 + set libDir=`mpicc -show -cc= | sed -e 's/.*-L\([^ ]*\).*/\1/'` + setenv MPI_ARCH_PATH "${libDir:h}" + _foamAddLib $libDir + unset libDir + breaksw + case HPMPI: setenv FOAM_MPI hpmpi setenv MPI_HOME /opt/hpmpi diff --git a/etc/config.sh/mpi b/etc/config.sh/mpi index 856f6695ef..47745f952b 100644 --- a/etc/config.sh/mpi +++ b/etc/config.sh/mpi @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -149,6 +149,14 @@ MPICH-GM) _foamAddLib $GM_LIB_PATH ;; +MVAPICH2) + export FOAM_MPI=mvapich2 + libDir=`mpicc -show -cc= | sed -e 's/.*-L\([^ ]*\).*/\1/'` + export MPI_ARCH_PATH="${libDir%/*}" + _foamAddLib $libDir + unset libDir + ;; + HPMPI) export FOAM_MPI=hpmpi export MPI_HOME=/opt/hpmpi diff --git a/wmake/rules/General/mplibMVAPICH2 b/wmake/rules/General/mplibMVAPICH2 new file mode 100644 index 0000000000..96622f569c --- /dev/null +++ b/wmake/rules/General/mplibMVAPICH2 @@ -0,0 +1,3 @@ +PFLAGS = -DMPICH_SKIP_MPICXX +PINC = -isystem $(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH) -L$(MPI_ARCH_PATH)/lib -lmpi