Cleanup old platform specific module loading code
Cleanup module loading code for decommisioned systems. Further, merge the actual loading of modules into single line as a workaround to prevent an issue with lmod's automatic reloading of module dependencies. This might not fix all reltated issues.
This commit is contained in:
parent
7940dde4b9
commit
6335b47a65
1 changed files with 29 additions and 73 deletions
102
sit
102
sit
|
@ -2,12 +2,15 @@
|
||||||
#
|
#
|
||||||
# Install script inspired by the ebuild system of Gentoo Linux
|
# Install script inspired by the ebuild system of Gentoo Linux
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2018 Christoph Niethammer <niethammer@hlrs.de>
|
# Copyright (c) 2011-2022 Christoph Niethammer <niethammer@hlrs.de>
|
||||||
#
|
#
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
|
#source colors.sh
|
||||||
|
#echo -e "${RED}DEBUGME: $MPI_VERSION${ENDCOLOR}"
|
||||||
|
|
||||||
function show_help() {
|
function show_help() {
|
||||||
echo "Usage: $0 [options] [action] <sit package name>"
|
echo "Usage: $0 [options] [action] <sit package name>"
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
|
@ -115,48 +118,30 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "$COMPILER" == "system" ] ; then
|
sit_info_verbose "COMPILER: $COMPILER"
|
||||||
echo "Using system default compiler"
|
sit_info_verbose "COMPILER version: $COMPILER_VERSION"
|
||||||
COMPILER="" # prevent any compiler specs in the prefix
|
sit_info_verbose "MPI: $MPI"
|
||||||
else
|
sit_info_verbose "MPI version: $MPI_VERSION"
|
||||||
case $PLATFORM in
|
|
||||||
hazelhen)
|
case $PLATFORM in
|
||||||
module swap $(module list -l 2>&1 | awk '/^PrgEnv-/{print $1}') PrgEnv-${COMPILER}
|
hawk|vulcan)
|
||||||
if [ ! -z "$COMPILER_VERSION" ] ; then
|
COMPILER_MODULE=${COMPILER}${COMPILER_VERSION:+"/${COMPILER_VERSION}"}
|
||||||
if [ "${COMPILER}" == "gnu" ] ; then
|
MPI_MODULE=${MPI}${MPI_VERSION:+"/${MPI_VERSION}"}
|
||||||
module swap gcc gcc/$COMPILER_VERSION
|
MPI_VERSION_NUM=${MPI_VERSION%%-*}
|
||||||
else
|
sit_info_verbose "MPI version num: $MPI_VERSION_NUM"
|
||||||
module swap $COMPILER $COMPILER/$COMPILER_VERSION
|
;;
|
||||||
fi
|
system)
|
||||||
# adjust MPICH and libsci versions to match compiler
|
echo "Using system default compiler and MPI"
|
||||||
# module load cray-mpich-compat/v7 || module load cray-mpich-compat/v6
|
COMPILER="" # prevent any compiler specs in the prefix
|
||||||
fi
|
MPI=""
|
||||||
MPI_DIR=$MPICH_DIR
|
;;
|
||||||
module unload craype-hugepages16M
|
*)
|
||||||
module sw craype-network-aries craype-network-none
|
sit_fail "Unknown or unsupported system"
|
||||||
module unload cray-mpich
|
;;
|
||||||
module sw craype-haswell craype-sandybridge
|
esac
|
||||||
;;
|
echo "Loading modules: ${COMPILER_MODULE} ${MPI_MODULE}"
|
||||||
hawk)
|
|
||||||
if [ -z "$COMPILER_VERSION" ] ; then
|
module load "${COMPILER_MODULE}" "${MPI_MODULE}"
|
||||||
COMPILER_MODULE=${COMPILER}
|
|
||||||
else
|
|
||||||
COMPILER_MODULE=${COMPILER}/${COMPILER_VERSION}
|
|
||||||
fi
|
|
||||||
echo "Loading compiler module ${COMPILER_MODULE}"
|
|
||||||
module load ${COMPILER_MODULE}
|
|
||||||
;;
|
|
||||||
laki|vulcan|*)
|
|
||||||
if [ -z "$COMPILER_VERSION" ] ; then
|
|
||||||
COMPILER_MODULE=compiler/${COMPILER}
|
|
||||||
else
|
|
||||||
COMPILER_MODULE=compiler/${COMPILER}/${COMPILER_VERSION}
|
|
||||||
fi
|
|
||||||
echo "Loading compiler module ${COMPILER_MODULE}"
|
|
||||||
module load ${COMPILER_MODULE}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -z "${COMPILER}" ] ; then
|
if [ ! -z "${COMPILER}" ] ; then
|
||||||
# reevaluate compiler version
|
# reevaluate compiler version
|
||||||
|
@ -173,35 +158,6 @@ fi
|
||||||
|
|
||||||
|
|
||||||
if [ ! -z "$MPI" ] ; then
|
if [ ! -z "$MPI" ] ; then
|
||||||
MPI_MODULE="$MPI"
|
|
||||||
sit_info_verbose "MPI: $MPI"
|
|
||||||
sit_info_verbose "MPI version: $MPI_VERSION"
|
|
||||||
if [ ! -z "$MPI_VERSION" ] ; then
|
|
||||||
MPI_VERSION_NUM=${MPI_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
|
|
||||||
case $PLATFORM in
|
|
||||||
vulcan)
|
|
||||||
MPI_MODULE="mpi/$MPI"
|
|
||||||
;;
|
|
||||||
hawk)
|
|
||||||
MPI_MODULE="$MPI"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
sit_error "mpi not supported on this platform"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo "Loading MPI module ${MPI_MODULE}"
|
|
||||||
module load $MPI_MODULE
|
|
||||||
|
|
||||||
case $COMPILER in
|
case $COMPILER in
|
||||||
intel)
|
intel)
|
||||||
if [[ $MPI == "impi" ]] ; then
|
if [[ $MPI == "impi" ]] ; then
|
||||||
|
@ -214,7 +170,7 @@ if [ ! -z "$MPI" ] ; then
|
||||||
MPIFC="mpif90"
|
MPIFC="mpif90"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
gnu|*)
|
*)
|
||||||
MPICC="mpicc"
|
MPICC="mpicc"
|
||||||
MPICXX="mpicxx"
|
MPICXX="mpicxx"
|
||||||
MPIFC="mpif90"
|
MPIFC="mpif90"
|
||||||
|
|
Loading…
Reference in a new issue