diff --git a/etc/cshrc b/etc/cshrc index b130f8c75..a565149d4 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -128,7 +128,7 @@ if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt #setenv WM_COMPILE_OPTION Opt #setenv WM_COMPILE_OPTION Debug -# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI +# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI | MVAPICH2 if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI # WM_NCOMPPROCS = diff --git a/etc/settings.csh b/etc/settings.csh index 6d3435b38..0b8674384 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -282,6 +282,36 @@ case SYSTEMOPENMPI: unset mpi_version breaksw +case MVAPICH2: + set mpi_version=mvapich2 + + if ($?MVAPICH2_BIN_DIR != 0) then + if (-d "${MVAPICH2_BIN_DIR}" ) then + _foamAddPath $MVAPICH2_BIN_DIR + endif + else + set mpicc_cmd=`which mpicc` + setenv MVAPICH2_BIN_DIR `dirname $mpicc_cmd` + unset mpicc_cmd + endif + + setenv MPI_HOME `dirname $MVAPICH2_BIN_DIR` + setenv MPI_ARCH_PATH $MPI_HOME + + setenv PINC "`mpicc -show -cc= -nativelinking`" + setenv PLIBS "`mpicc -show -cc= | sed "s%$PINC%%"`" + + if ($?FOAM_VERBOSE && $?prompt) then + echo " Environment variables defined for MVAPICH2:" + echo " MPI_ARCH_PATH : $MPI_ARCH_PATH" + echo " PINC : $PINC" + echo " PLIBS : $PLIBS" + endif + + setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version + unset mpi_version + breaksw + case MPICH: set mpi_version=mpich-1.2.4 setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version