#!/bin/bash # For internal use at ECCC # Source this file to: # - Load profile, Intel compiler and code-tools for Intel, depending on compiler version # - Load RPN-SI libraries and utilities, and RPNPY # - Load a script for common setup to all compilers DOMAIN=`hostname -d` # Check name of the script called, to export corresponding Intel compiler version INTEL_SCRIPT_NAME=$(echo $(basename ${BASH_SOURCE[0]})) case ${INTEL_SCRIPT_NAME} in .eccc_setup_intel) export COMPILER_VERSION=2022.1.2 ;; .eccc_setup_intel_2021.4.0) export COMPILER_VERSION=2021.4.0 ;; .eccc_setup_intel_2023.2.0) export COMPILER_VERSION=2023.2.0 ;; esac # According to the domain, load corresponding code-tools if [[ ${DOMAIN} = "collab.science.gc.ca" ]]; then . r.load.dot rpn/code-tools/ENV/cdt-1.6.8/SCIENCE/gpscc3/inteloneapi-${COMPILER_VERSION} elif [[ -z "${DOMAIN}" || ${DOMAIN} = "science.gc.ca" ]]; then . r.load.dot rpn/code-tools/ENV/cdt-1.6.8/SCIENCE/inteloneapi-${COMPILER_VERSION} else . r.load.dot rpn/code-tools/ENV/cdt-1.6.8/ECCC/inteloneapi-${COMPILER_VERSION} fi # Load latest version of RPN-SI libraries and utilities . r.load.dot rpn/libs/20230906 . r.load.dot rpn/utils/20230906 # Load latest version of RPNPY . r.load.dot rpn/MIG/ENV/x/rpnpy/2.2.0-rc2 # Load Intel FFTW if on rhel, and if using Intel 2021 or Intel 2022 if [[ ${ORDENV_DIST} = "rhel" ]]; then if [[ ${COMPILER_VERSION} = "2022.1.2" ]]; then . r.load.dot main/opt/fftw3/fftw3-3.3.10/intelmpi-${COMPILER_VERSION}/01/ export FFTW_ROOT=/fs/ssm/main/opt/fftw3/fftw3-3.3.10/intelmpi-${COMPILER_VERSION}/01/rhel-8-amd64-64 elif [[ ${COMPILER_VERSION} = "2021.4.0" ]]; then . r.load.dot main/opt/fftw3/fftw3-3.3.10/intelmpi-${COMPILER_VERSION}/inteloneapi-${COMPILER_VERSION}/01 export FFTW_ROOT=/fs/ssm/main/opt/fftw3/fftw3-3.3.10/intelmpi-${COMPILER_VERSION}/inteloneapi-${COMPILER_VERSION}/01/rhel-8-amd64-64 fi fi # We need a more recent version of cmake than the one available by default . ssmuse-sh -d main/opt/cmake/cmake-3.21.1 # Check and tell if maestro is loaded if [ -z "${MAESTRO_VERSION}" ]; then echo "" echo "Maestro is not loaded: GEM task setup scripts will be used instead of maestro scripts." else echo "Maestro ${MAESTRO_VERSION} scripts will be used" fi # Call common setup file export COMPILER_SUITE=intel . ./.common_setup ${COMPILER_SUITE} # Set WITH_SYSTEM_RPN variable with default value TRUE for ECCC users export WITH_SYSTEM_RPN=TRUE