-
Notifications
You must be signed in to change notification settings - Fork 8
236 lines (221 loc) · 8.84 KB
/
ci.yml
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
name: CI
on:
# Triggers the workflow on pull request events only for the "develop" branch
pull_request:
branches: [ "develop" ]
workflow_dispatch:
jobs:
build-run-tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: ghcr.io/llnl/ams-ci-almalinux8:latest
strategy:
matrix:
with_hdf5: [ON, OFF]
with_caliper: [ON, OFF]
with_mpi : [ON, OFF]
steps:
- uses: actions/checkout@v3
- name: Build WITH_HDF5=${{ matrix.with_hdf5 }}, WITH_CALIPER=${{ matrix.with_caliper }} WITH_MPI=${{ matrix.with_mpi }}
shell: bash -l {0}
run: |
module load gcc/11.2.1
source /spack/share/spack/setup-env.sh
spack env activate -p /ams-spack-env
rm -rf build/
mkdir build
cd build
export AMS_MFEM_PATH=$(spack location -i mfem)
export AMS_TORCH_PATH=$(spack location -i py-torch)/lib/python3.10/site-packages/torch/share/cmake/Torch
export AMS_FAISS_PATH=$(spack location -i faiss)
export AMS_UMPIRE_PATH=$(spack location -i umpire)
export AMS_HDF5_PATH=$(spack location -i hdf5)
cmake \
-DBUILD_SHARED_LIBS=On \
-DCMAKE_PREFIX_PATH=./install \
-DWITH_CALIPER=${{ matrix.with_caliper }} \
-DWITH_HDF5=${{ matrix.with_hdf5 }} \
-DAMS_HDF5_DIR=$AMS_HDF5_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_CUDA=Off \
-DWITH_MPI=${{ matrix.with_mpi }} \
-DWITH_TESTS=On \
-DTorch_DIR=$AMS_TORCH_PATH \
-DWITH_AMS_DEBUG=On \
-DWITH_WORKFLOW=Off \
$GITHUB_WORKSPACE
make
- name: Run Tests WITH_HDF5=${{ matrix.with_hdf5 }}, WITH_CALIPER=${{ matrix.with_caliper }} WITH_MPI=${{ matrix.with_mpi }}
run: |
cd build
source /spack/share/spack/setup-env.sh
spack env activate -p /ams-spack-env
env CTEST_OUTPUT_ON_FAILURE=1 make test
- name: Install AMS WITH_HDF5=${{ matrix.with_hdf5 }}, WITH_CALIPER=${{ matrix.with_caliper }} WITH_MPI=${{ matrix.with_mpi }}
run: |
cd build
source /spack/share/spack/setup-env.sh
spack env activate -p /ams-spack-env
make install
build-cuda-tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: ghcr.io/llnl/ams-ci-cuda11.6.1:latest
strategy:
matrix:
with_hdf5: [ON, OFF]
with_caliper: [ON, OFF]
with_mpi : [ON, OFF]
steps:
- uses: actions/checkout@v3
- name: Build WITH_CUDA=On WITH_HDF5=${{ matrix.with_hdf5 }}, WITH_CALIPER=${{ matrix.with_caliper }} WITH_MPI=${{ matrix.with_mpi }}
shell: bash -l {0}
run: |
module load gcc/11.2.1
source /spack/share/spack/setup-env.sh
spack env activate -p /ams-spack-env
rm -rf build/
mkdir build
cd build
export AMS_MFEM_PATH=$(spack location -i mfem)
export AMS_TORCH_PATH=$(spack location -i py-torch)/lib/python3.10/site-packages/torch/share/cmake/Torch
export AMS_FAISS_PATH=$(spack location -i faiss)
export AMS_UMPIRE_PATH=$(spack location -i umpire)
export AMS_HDF5_PATH=$(spack location -i hdf5)
cmake \
-DBUILD_SHARED_LIBS=On \
-DCMAKE_PREFIX_PATH=./install \
-DWITH_CALIPER=${{ matrix.with_caliper }} \
-DWITH_HDF5=${{ matrix.with_hdf5 }} \
-DAMS_HDF5_DIR=$AMS_HDF5_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_CUDA=On \
-DWITH_MPI=${{ matrix.with_mpi }} \
-DWITH_TESTS=On \
-DTorch_DIR=$AMS_TORCH_PATH \
-DWITH_AMS_DEBUG=On \
-DWITH_WORKFLOW=Off \
$GITHUB_WORKSPACE
make
- name: Install AMS WITH_CUDA=On WITH_HDF5=${{ matrix.with_hdf5 }}, WITH_CALIPER=${{ matrix.with_caliper }} WITH_MPI=${{ matrix.with_mpi }}
run: |
cd build
source /spack/share/spack/setup-env.sh
spack env activate -p /ams-spack-env
make install
install-link-cpu-tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: ghcr.io/llnl/ams-ci-almalinux8:latest
strategy:
matrix:
with_shared: [ON, OFF]
steps:
- uses: actions/checkout@v3
- name: Build SharedLibray=${{ matrix.with_shared }}
shell: bash -l {0}
run: |
module load gcc/11.2.1
source /spack/share/spack/setup-env.sh
spack env activate -p /ams-spack-env
rm -rf build/
mkdir build
cd build
export AMS_MFEM_PATH=$(spack location -i mfem)
export AMS_TORCH_PATH=$(spack location -i py-torch)/lib/python3.10/site-packages/torch/share/cmake/Torch
export AMS_FAISS_PATH=$(spack location -i faiss)
export AMS_UMPIRE_PATH=$(spack location -i umpire)
export AMS_HDF5_PATH=$(spack location -i hdf5)
cmake \
-DBUILD_SHARED_LIBS=${{ matrix.with_shared }} \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH="On" ${{ matrix.with_shared }} \
-DCMAKE_PREFIX_PATH=./install \
-DWITH_CALIPER=On \
-DWITH_HDF5=On \
-DAMS_HDF5_DIR=$AMS_HDF5_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_CUDA=Off \
-DWITH_MPI=On \
-DWITH_TESTS=On \
-DTorch_DIR=$AMS_TORCH_PATH \
-DWITH_AMS_DEBUG=On \
-DWITH_WORKFLOW=Off \
$GITHUB_WORKSPACE
make
make install
echo "AMS_INSTALL_PATH=$(pwd)/install" >> $GITHUB_ENV
- name: Install IdealGas SharedLibray=${{ matrix.with_shared }}
shell: bash -l {0}
run: |
module load gcc/11.2.1
source /spack/share/spack/setup-env.sh
spack env activate -p /ams-spack-env
mkdir build_idealgas/
cd build_idealgas/
export AMS_MFEM_PATH=$(spack location -i mfem)
cmake -DWITH_CUDA=Off -DAMS_DIR=${AMS_INSTALL_PATH}/lib64/cmake/AMS -DMFEM_DIR=${AMS_MFEM_PATH} $GITHUB_WORKSPACE/examples/ideal_gas/
make VERBOSE=1
install-link-cuda-tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: ghcr.io/llnl/ams-ci-cuda11.6.1:latest
strategy:
matrix:
with_shared: [ON, OFF]
steps:
- uses: actions/checkout@v3
- name: Build SharedLibray=${{ matrix.with_shared }}
shell: bash -l {0}
run: |
module load gcc/11.2.1
source /spack/share/spack/setup-env.sh
spack env activate -p /ams-spack-env
rm -rf build/
mkdir build
cd build
export AMS_MFEM_PATH=$(spack location -i mfem)
export AMS_TORCH_PATH=$(spack location -i py-torch)/lib/python3.10/site-packages/torch/share/cmake/Torch
export AMS_FAISS_PATH=$(spack location -i faiss)
export AMS_UMPIRE_PATH=$(spack location -i umpire)
export AMS_HDF5_PATH=$(spack location -i hdf5)
cmake \
-DBUILD_SHARED_LIBS=${{ matrix.with_shared }} \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH="On" ${{ matrix.with_shared }} \
-DCMAKE_PREFIX_PATH=./install \
-DWITH_CALIPER=On \
-DWITH_HDF5=On \
-DAMS_HDF5_DIR=$AMS_HDF5_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_CUDA=On \
-DWITH_MPI=On \
-DWITH_TESTS=On \
-DTorch_DIR=$AMS_TORCH_PATH \
-DWITH_AMS_DEBUG=On \
-DWITH_WORKFLOW=Off \
$GITHUB_WORKSPACE
make
make install
echo "AMS_INSTALL_PATH=$(pwd)/install" >> $GITHUB_ENV
echo "AMS_INSTALL_PATH=$(pwd)/install"
ls $(pwd)/install
- name: Install IdealGas SharedLibray=${{ matrix.with_shared }}
shell: bash -l {0}
run: |
module load gcc/11.2.1
source /spack/share/spack/setup-env.sh
spack env activate -p /ams-spack-env
mkdir build_idealgas/
cd build_idealgas/
export AMS_MFEM_PATH=$(spack location -i mfem)
cmake -DCMAKE_CUDA_ARCHITECTURES=70 -DAMS_DIR=${AMS_INSTALL_PATH}/lib64/cmake/AMS -DMFEM_DIR=${AMS_MFEM_PATH} $GITHUB_WORKSPACE/examples/ideal_gas/
make VERBOSE=1
- name: Install BOptions SharedLibray=${{ matrix.with_shared }}
shell: bash -l {0}
run: |
module load gcc/11.2.1
source /spack/share/spack/setup-env.sh
spack env activate -p /ams-spack-env
mkdir build_bnm_opt/
cd build_bnm_opt/
cmake -DCMAKE_CUDA_ARCHITECTURES=70 -DAMS_DIR=${AMS_INSTALL_PATH}/lib64/cmake/AMS $GITHUB_WORKSPACE/examples/bnm_opt/
make VERBOSE=1