Intel MPI module names do not depend on compiler (version).

This commit is contained in:
Christoph Niethammer 2013-06-17 08:36:57 +00:00
parent 5f6afe13b4
commit 9069a8dc76

40
sit
View file

@ -97,23 +97,37 @@ if [ ! -z "$MPI" ] ; then
MPI_MODULE="mpi/$MPI"
if [ ! -z "$MPI_VERSION" ] ; then
MPI_VERSION_NUM=${MPI_VERSION%%-*}
MPI_MODULE=${MPI_MODULE}${MPI_VERSION_NUM:+"/${MPI_VERSION_NUM}-$COMPILER-$COMPILER_VERSION"}
case $MPI in
impi)
MPI_MODULE=${MPI_MODULE}${MPI_VERSION_NUM:+"/${MPI_VERSION_NUM}"}
;;
*)
MPI_MODULE=${MPI_MODULE}${MPI_VERSION_NUM:+"/${MPI_VERSION_NUM}-$COMPILER-$COMPILER_VERSION"}
;;
esac
fi
echo "Loading MPI module ${MPI_MODULE}"
module load $MPI_MODULE
case $COMPILER in
gnu)
MPICC="mpicc"
MPICXX="mpicxx"
MPIFC="mpif90"
;;
intel)
MPICC="mpiicc"
MPICXX="mpiicpc"
MPIFC="mpiifort"
;;
esac
case $COMPILER in
intel)
if [[ $mpi == "impi" ]] ; then
MPICC="mpiicc"
MPICXX="mpiicpc"
MPIFC="mpiifort"
else
MPICC="mpicc"
MPICXX="mpicxx"
MPIFC="mpif90"
fi
;;
gnu|*)
MPICC="mpicc"
MPICXX="mpicxx"
MPIFC="mpif90"
;;
esac
echo "MPI compiler env: MPICC=$MPICC, MPICXX=$MPICXX, MPIFC=$MPIFC"
MPI_DIR=${MPI_DIR:=$(dirname $(dirname $(which $MPICC)))}
fi