-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eccc_setup_intel
69 lines (57 loc) · 2.5 KB
/
.eccc_setup_intel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/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