diff --git a/sit b/sit index 954269a..2f6e92e 100755 --- a/sit +++ b/sit @@ -70,7 +70,8 @@ export ${COMPILER_OPTS} if [ ! -z "$MPI" ] ; then MPI_MODULE="mpi/$MPI" if [ ! -z "$MPI_VERSION" ] ; then - MPI_MODULE=${MPI_MODULE}${MPI_VERSION:+"/${MPI_VERSION%%-*}-$COMPILER-$COMPILER_VERSION"} + MPI_VERSION_NUM=${MPI_VERSION%%-*} + MPI_MODULE=${MPI_MODULE}${MPI_VERSION_NUM:+"/${MPI_VERSION_NUM}-$COMPILER-$COMPILER_VERSION"} fi echo "Loading MPI module ${MPI_MODULE}" module load $MPI_MODULE @@ -90,7 +91,7 @@ fi # construct the final installation directory path PREFIX="${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/${VERSION}" -PREFIX_SUFFIX=${MPI:+"-$MPI"}${MPI_VERSION:+"-$MPI_VERSION"} +PREFIX_SUFFIX=${MPI:+"-$MPI"}${MPI_VERSION_NUM:+"-$MPI_VERSION_NUM"} PREFIX_SUFFIX=$PREFIX_SUFFIX${COMPILER:+"-$COMPILER"}${COMPILER_VERSION:+"-$COMPILER_VERSION"} PREFIX_SUFFIX=$PREFIX_SUFFIX${PACKAGE_DESCRIPTOR}