diff --git a/conf/proj.yaml b/conf/proj.yaml index a656ebb947bb6cfe999b790e22c24f01424b3945..deb4cf28dfcece1a436add2ad83ae1ad2179df57 100644 --- a/conf/proj.yaml +++ b/conf/proj.yaml @@ -1,6 +1,7 @@ spack: url: git@gitlab.physik.uni-muenchen.de:LDAP_rbg/spack.git branch: lmu/ubuntu20.04-icon + compiler: gcc%11.3.0 icon: version: 2.6.4-nwp3 diff --git a/templates/build_icon.sh b/templates/build_icon.sh index f15c3bf1fbf8e8bd6463eea9632f5de0e42d63f6..7e78413c3680e2ad78e7e954db0d1403d606a535 100644 --- a/templates/build_icon.sh +++ b/templates/build_icon.sh @@ -4,6 +4,7 @@ WORKDIR=%HPCROOTDIR% ICON_VERSION=%ICON_VERSION% SPACK_URL=%spack.url% SPACK_BRANCH=%spack.branch% +SPACK_COMPILER=%spack.compiler% # If the workdir directory does not exist create it @@ -24,14 +25,12 @@ fi # Setup the environment source ${SPACK_ENV} -# If the model is not installed, install it. -if [ $( spack find icon-nwp@${ICON_VERSION} &> /dev/null ; echo $? ) -ne 0 ]; then - spack install icon-nwp@${ICON_VERSION} ^mpi+slurm -fi if [ $( spack find icon-nwp@${ICON_VERSION} &> /dev/null ; echo $? ) -ne 0 ]; then echo "Installing icon-nwp@${ICON_VERSION}." - spack install icon-nwp@${ICON_VERSION} + # Compile openmpi with schedulers=slurm + spack install openmpi${SPACK_COMPILER}+legacylaunchers schedulers=slurm + spack install icon-nwp@${ICON_VERSION}%${SPACK_COMPILER} ^openmpi%${SPACK_COMPILER} else echo "icon-nwp@${ICON_VERSION} already installed!" fi