forked from ExaChem/exachem
-
Notifications
You must be signed in to change notification settings - Fork 0
279 lines (253 loc) · 9.23 KB
/
c-cpp.yaml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
name: ExaChem_CI
on:
push:
paths-ignore:
- docs
pull_request:
branches:
- develop
repository_dispatch:
types: [backend_automation]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 1000
strategy:
matrix:
os:
- [self-hosted, ubuntu22]
- [self-hosted, macos]
backend:
- ga
mpi_impl:
- mpich
cxx:
- g++
cc:
- gcc
fc:
- gfortran
use_cuda:
- no-cuda
use_scalapack:
- no-scalapack
include:
- os: [self-hosted, ubuntu22]
mpi_impl: mpich
cxx: clang++
cc: clang
fc: gfortran
backend: ga
use_cuda: no-cuda
use_scalapack: no-scalapack
- os: [self-hosted, ubuntu22]
mpi_impl: mpich
cxx: g++
cc: gcc
fc: gfortran
backend: ga
use_cuda: cuda
use_scalapack: no-scalapack
- os: [self-hosted, ubuntu22]
mpi_impl: mpich
cxx: g++
cc: gcc
fc: gfortran
backend: ga
use_cuda: no-cuda
use_scalapack: scalapack
- os: [self-hosted, macos]
mpi_impl: mpich
cxx: g++
cc: gcc
fc: gfortran
backend: ga
use_cuda: no-cuda
use_scalapack: no-scalapack
exclude:
- os: [self-hosted, macos]
mpi_impl: mpich
cxx: g++
cc: gcc
fc: gfortran
backend: upcxx
use_cuda: no-cuda
use_scalapack: no-scalapack
- os: [self-hosted, ubuntu22]
mpi_impl: mpich
cxx: g++
cc: gcc
fc: gfortran
backend: upcxx
use_cuda: cuda
use_scalapack: no-scalapack
fail-fast: true
env:
MPI_IMPL: ${{ matrix.mpi_impl }}
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
FC: ${{ matrix.fc }}
steps:
- uses: actions/checkout@v4
- name: Check SIMD
id: get-simd
run: |
chmod +x ${GITHUB_WORKSPACE}/.github/workflows/scripts/check_simd.sh
echo "simd=$(${GITHUB_WORKSPACE}/.github/workflows/scripts/check_simd.sh)" >> $GITHUB_ENV
shell: bash
- name: Set cache path mac
if: ${{ matrix.os[1] == 'macos' }}
id: set-cache-path-mac
run: |
echo "exachem_cache_path=$HOME/software/CI/cache/exachem_cache" >> $GITHUB_ENV
shell: bash
- name: Set cache path linux
if: ${{ matrix.os[1] == 'ubuntu22' }}
id: set-cache-path-linux
run: |
echo "exachem_cache_path=/hpc/software/CI/cache/exachem_cache" >> $GITHUB_ENV
shell: bash
- name: Set build option defaults
id: set-build-option-defaults
run: |
echo "INSTALL_PATH=$GITHUB_WORKSPACE/install" >> $GITHUB_ENV
echo "USE_CUDA=OFF" >> $GITHUB_ENV
echo "USE_SCALAPACK=OFF" >> $GITHUB_ENV
echo "EC_NPROC=12" >> $GITHUB_ENV
echo "LA_VENDOR=BLIS" >> $GITHUB_ENV
shell: bash
- name: Set cuda build options
if: ${{ matrix.use_cuda == 'cuda' }}
shell: bash
run: |
echo "USE_CUDA=ON" >> $GITHUB_ENV
- name: Set scalapack build options
if: ${{ matrix.use_scalapack == 'scalapack' }}
shell: bash
run: |
echo "USE_SCALAPACK=ON" >> $GITHUB_ENV
- name: load llvm
if: ${{ matrix.cc == 'clang' && matrix.cxx == 'clang++' && matrix.os[1] == 'ubuntu22' }}
shell: bash
run: |
module load llvm/11.1.0
echo "CC=$(which clang)" >> $GITHUB_ENV
echo "CXX=$(which clang++)" >> $GITHUB_ENV
- name: macos env
if: ${{ matrix.os[1] == 'macos' }}
shell: bash
run: |
echo "LA_VENDOR=OpenBLAS" >> $GITHUB_ENV
- name: Cache install steps (backend = ga)
if: ${{ matrix.backend == 'ga' }}
id: exachem-cache-install
uses: actions/cache@v4
with:
path: |
${{ env.exachem_cache_path }}
key: ${{ runner.os }}-${{ matrix.mpi_impl }}-${{ matrix.cc }}-${{ matrix.cxx }}-simd${{ env.simd }}-exachem-ga-${{ matrix.use_scalapack }}
- name: Cache install steps (backend = upcxx)
if: ${{ matrix.backend == 'upcxx' }}
id: exachem-upcxx-cache-install
uses: actions/cache@v4
with:
path: |
${{ env.exachem_cache_path }}
key: ${{ runner.os }}-${{ matrix.mpi_impl }}-${{ matrix.cc }}-${{ matrix.cxx }}-simd${{ env.simd }}-exachem-upcxx
- name: show-mpi
run: |
mpicc -show
mpifort -show
mpicxx -show
mpiexec --version
- name: show-compilers
run: |
$CC --version
$CXX --version
$FC --version
python3 --version
shell: bash
- name: build upcxx
if: ${{ matrix.backend == 'upcxx' && steps.exachem-upcxx-cache-install.outputs.cache-hit != 'true' }}
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/../external_deps
cd $GITHUB_WORKSPACE/../external_deps
wget https://bitbucket.org/berkeleylab/upcxx/downloads/upcxx-2023.9.0.tar.gz
tar xf upcxx-2023.9.0.tar.gz
cd upcxx-2023.9.0
./configure --prefix=${{ env.INSTALL_PATH }} --with-cxx=mpicxx --with-cc=mpicc --with-default-network=smp
make -j${{ env.EC_NPROC }} all
make install
- name: find cache
id: find_cache
if: ${{ steps.exachem-cache-install.outputs.cache-hit == 'true' || steps.exachem-upcxx-cache-install.outputs.cache-hit == 'true' }}
run: |
pwd
ls -lart
mkdir -p ${{ env.INSTALL_PATH }} ${{ env.exachem_cache_path }} || true
rsync -av ${{ env.exachem_cache_path }}/* ${{ env.INSTALL_PATH }}/.
ls -lrt ${{ env.INSTALL_PATH }} || true
- name: build exachem (backend = ga)
if: ${{ matrix.backend == 'ga' }}
id: build_exachem
run: |
echo "CI_NRANKS=3" >> $GITHUB_ENV
# TAMM build
git clone https://github.com/NWChemEx/TAMM $GITHUB_WORKSPACE/TAMM
cd $GITHUB_WORKSPACE/TAMM
cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PATH }} -DLINALG_VENDOR=${{ env.LA_VENDOR }} -DGPU_ARCH=70 -DMODULES="CC" -DTAMM_ENABLE_CUDA=${{ env.USE_CUDA }} -DUSE_SCALAPACK=${{ env.USE_SCALAPACK }}
cd build
make -j${{ env.EC_NPROC }}
make install
mkdir -p ${{ env.exachem_cache_path }} || true
rsync -av --exclude="*tamm*" ${{ env.INSTALL_PATH }}/* ${{ env.exachem_cache_path }}/.
# Chem build
cd $GITHUB_WORKSPACE
cmake -H. -Bbuild -DGPU_ARCH=70 -DMODULES="CC" -DTAMM_ENABLE_CUDA=${{ env.USE_CUDA }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PATH }}
cd build
make -j${{ env.EC_NPROC }}
# make install
# mkdir -p ${{ env.exachem_cache_path }} || true
# rsync -av --exclude="*tamm*" ${{ env.INSTALL_PATH }}/* ${{ env.exachem_cache_path }}/.
- name: build exachem (backend = upcxx)
if: ${{ matrix.backend == 'upcxx' }}
id: build_exachem_upcxx
run: |
export PATH=$PATH:$GITHUB_WORKSPACE/install/bin
export CPATH=$CPATH:/hpc/software/spack/opt/spack/linux-ubuntu22.04-broadwell/gcc-11.4.0/mpich-4.2.1-6pwa6w25afu5mgacsiywlczdklq37ktl/include
echo "UPCXX_SHARED_HEAP_SIZE=MAX" >> $GITHUB_ENV
echo "CI_MPIEXEC=upcxx-run" >> $GITHUB_ENV
echo "CI_NRANKS=2" >> $GITHUB_ENV
echo "UPCXX_MISSING_TESTS=1" >> $GITHUB_ENV
# TAMM build
git clone https://github.com/NWChemEx/TAMM $GITHUB_WORKSPACE/TAMM
cd $GITHUB_WORKSPACE/TAMM
UPCXX_CODEMODE=O3 CXX=upcxx cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PATH }} -DGPU_ARCH=70 -DMODULES=CC -DTAMM_ENABLE_CUDA=${{ env.USE_CUDA }} -DUSE_UPCXX=ON -DMPIRUN_EXECUTABLE=${{ env.CI_MPIEXEC }}
cd build
UPCXX_NETWORK=smp UPCXX_CODEMODE=O3 make -j${{ env.EC_NPROC }}
UPCXX_NETWORK=smp UPCXX_CODEMODE=O3 make install
mkdir -p ${{ env.exachem_cache_path }} || true
rsync -av --exclude="*tamm*" ${{ env.INSTALL_PATH }}/* ${{ env.exachem_cache_path }}/.
# Chem build
cd $GITHUB_WORKSPACE
UPCXX_CODEMODE=O3 CXX=upcxx cmake -H. -Bbuild -DGPU_ARCH=70 -DMODULES=CC -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PATH }} -DTAMM_ENABLE_CUDA=${{ env.USE_CUDA }} -DUSE_UPCXX=ON -DMPIRUN_EXECUTABLE=${{ env.CI_MPIEXEC }}
cd build
UPCXX_NETWORK=smp UPCXX_CODEMODE=O3 make -j${{ env.EC_NPROC }}
- name: ctest
run: |
cd $GITHUB_WORKSPACE/build
export PATH=$PATH:$GITHUB_WORKSPACE/install/bin
echo "OMP_NUM_THREADS=1" >> $GITHUB_ENV
# ctest -VV
$GITHUB_WORKSPACE/ci/scripts/run_ci $GITHUB_WORKSPACE $GITHUB_WORKSPACE/build/methods_stage/${{ env.INSTALL_PATH }}/methods/ExaChem ${{ env.CI_NRANKS }} ${{ env.CI_MPIEXEC }} ${{ env.UPCXX_MISSING_TESTS }}
# - name: gcovr
# run: |
# cd $GITHUB_WORKSPACE
# gcovr --root . --exclude build --exclude tests --xml ./coverage.xml
# ls -al .
# - uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./coverage.xml