34
34
prec : ['DP', 'SP']
35
35
name :
36
36
- linux gnu-10
37
+ - linux nvhpc-23.5
38
+ - linux intel-classic
39
+ - macos
37
40
38
41
include :
39
42
47
50
python-version : ' 3.8'
48
51
caching : true
49
52
53
+ - name : linux nvhpc-23.5
54
+ os : ubuntu-20.04
55
+ compiler : nvhpc-23.5
56
+ compiler_cc : nvc
57
+ compiler_cxx : nvc++
58
+ compiler_fc : nvfortran
59
+ cmake_options : -DCMAKE_CXX_FLAGS=--diag_suppress177
60
+ python-version : ' 3.8'
61
+ caching : true
62
+
63
+ - name : linux intel-classic
64
+ os : ubuntu-20.04
65
+ compiler : intel-classic
66
+ compiler_cc : icc
67
+ compiler_cxx : icpc
68
+ compiler_fc : ifort
69
+ python-version : ' 3.8'
70
+ caching : true
71
+
72
+ - name : macos
73
+ # Xcode compiler requires empty environment variables, so we pass null (~) here
74
+ os : macos-13
75
+ compiler : clang-14
76
+ compiler_cc : ~
77
+ compiler_cxx : ~
78
+ compiler_fc : gfortran-13
79
+ python-version : ' 3.11'
80
+ caching : true
81
+
50
82
runs-on : ${{ matrix.os }}
51
83
steps :
52
84
- name : Set up Python ${{ matrix.python-version }}
@@ -64,14 +96,77 @@ jobs:
64
96
echo "CXX=${{ matrix.compiler_cxx }}" >> $GITHUB_ENV
65
97
echo "FC=${{ matrix.compiler_fc }}" >> $GITHUB_ENV
66
98
67
- sudo apt-get update
68
- sudo apt-get install ninja-build
69
- sudo apt-get install libnetcdff-dev
99
+ if [[ "${{ matrix.os }}" =~ macos ]]; then
100
+ export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
101
+ export HOMEBREW_NO_AUTO_UPDATE=1
102
+ export HOMEBREW_NO_INSTALL_CLEANUP=1
103
+ export SDKROOT=$(xcrun --show-sdk-path)
104
+ echo "HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1" >> $GITHUB_ENV
105
+ echo "HOMEBREW_NO_AUTO_UPDATE=1" >> $GITHUB_ENV
106
+ echo "HOMEBREW_NO_INSTALL_CLEANUP=1" >> $GITHUB_ENV
107
+ echo "SDKROOT=$(xcrun --show-sdk-path)" >> $GITHUB_ENV
108
+ brew install ninja
109
+ brew install libomp
110
+ brew install netcdf-fortran
111
+ brew install coreutils
112
+ else
113
+ sudo apt-get update
114
+ sudo apt-get install ninja-build
115
+ sudo apt-get install libnetcdff-dev
116
+ fi
70
117
71
118
pip3 install numpy
72
119
73
120
printenv
74
121
122
+ - name : Cache Dependencies
123
+ # There seems to be a problem with cached NVHPC dependencies,
124
+ # leading to SIGILL perhaps due to slightly different architectures
125
+ if : matrix.caching
126
+ id : deps-cache
127
+
128
+ with :
129
+ path : ${{ env.DEPS_DIR }}
130
+ key : deps-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.build_type }}-${{ env.CACHE_SUFFIX }}
131
+
132
+ # Free up disk space for nvhpc
133
+ - name : Free Disk Space (Ubuntu)
134
+ uses : jlumbroso/free-disk-space@main
135
+ if : contains( matrix.compiler, 'nvhpc' )
136
+ continue-on-error : true
137
+ with :
138
+ # this might remove tools that are actually needed,
139
+ # if set to "true" but frees about 6 GB
140
+ tool-cache : false
141
+
142
+ # all of these default to true, but feel free to set to
143
+ # "false" if necessary for your workflow
144
+ android : true
145
+ dotnet : true
146
+ haskell : true
147
+ large-packages : true
148
+ docker-images : true
149
+ swap-storage : true
150
+
151
+ - name : Install NVHPC compiler
152
+ if : contains( matrix.compiler, 'nvhpc' )
153
+ shell : bash -eux {0}
154
+ run : |
155
+ ${ECLAND_TOOLS}/install-nvhpc.sh --prefix /opt/nvhpc --version 23.5
156
+ source /opt/nvhpc/env.sh
157
+ echo "${NVHPC_DIR}/compilers/bin" >> $GITHUB_PATH
158
+ [ -z ${MPI_HOME+x} ] || echo "MPI_HOME=${MPI_HOME}" >> $GITHUB_ENV
159
+ echo "localhost slots=72" >> ${MPI_HOME}/etc/openmpi-default-hostfile
160
+ echo "ECLAND_LAUNCH_SERIAL_MPI=1" >> $GITHUB_ENV
161
+
162
+ - name : Install Intel oneAPI compiler
163
+ if : contains( matrix.compiler, 'intel' )
164
+ run : |
165
+ ${ECLAND_TOOLS}/install-intel-oneapi.sh
166
+ source /opt/intel/oneapi/setvars.sh
167
+ printenv >> $GITHUB_ENV
168
+ echo "CACHE_SUFFIX=$CC-$($CC -dumpversion)" >> $GITHUB_ENV
169
+
75
170
- name : Install MPI
76
171
shell : bash -eux {0}
77
172
run : |
0 commit comments