diff --git a/etc/bashrc b/etc/bashrc index 6aad1f6ce..323d1a9dc 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -143,7 +143,7 @@ export WM_COMPILER_LIB_ARCH= # WM_COMPILE_OPTION = Opt | Debug | Prof : ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION -# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI +# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI | MVAPICH2 : ${WM_MPLIB:=OPENMPI}; export WM_MPLIB # WM_NCOMPPROCS = diff --git a/etc/settings.sh b/etc/settings.sh index e85bf95e8..6a2bc3c7d 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -333,6 +333,42 @@ SYSTEMOPENMPI) unset mpi_version ;; +MVAPICH2) + mpi_version=mvapich2 + + if [ -n "${MVAPICH2_BIN_DIR}" ] && [ -d "${MVAPICH2_BIN_DIR}" ] + then + _foamAddPath $MVAPICH2_BIN_DIR + else + MVAPICH2_BIN_DIR=$(dirname `which mpicc`) + fi + + if which mpicc >/dev/null + then + mpicc -v 2>/dev/null | grep -q "mpicc for MVAPICH2" || + echo "Warning: `which mpicc` does not appear to be for MVAPICH2" + else + echo "Warning: mpicc not available" + fi + + export MPI_HOME=`dirname $MVAPICH2_BIN_DIR` + export MPI_ARCH_PATH=$MPI_HOME + + export PINC="`mpicc -show -cc= -nativelinking`" + export PLIBS="`mpicc -show -cc= | sed "s%$PINC%%"`" + + if [ "$FOAM_VERBOSE" -a "$PS1" ] + then + echo " Environment variables defined for MVAPICH2:" + echo " MPI_ARCH_PATH : $MPI_ARCH_PATH" + echo " PINC : $PINC" + echo " PLIBS : $PLIBS" + fi + + export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version + unset mpi_version + ;; + MPICH) mpi_version=mpich-1.2.4 export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake index a01538cc3..6c4131068 100755 --- a/src/Pstream/Allwmake +++ b/src/Pstream/Allwmake @@ -5,7 +5,7 @@ set -x wmake libso dummy case "$WM_MPLIB" in -*MPI*) +*MPI* | MVAPICH*) set +x echo echo "Note: ignore spurious warnings about missing mpicxx.h headers" diff --git a/wmake/rules/linux64Gcc/mplibMVAPICH2 b/wmake/rules/linux64Gcc/mplibMVAPICH2 new file mode 100644 index 000000000..e69de29bb