Skip to content

Commit 35ed3a6

Browse files
committed
CI: Single Precision
1 parent 8eef6d7 commit 35ed3a6

1 file changed

Lines changed: 69 additions & 4 deletions

File tree

.github/workflows/ubuntu.yml

Lines changed: 69 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,50 @@ jobs:
180180
- name: validate created openPMD files
181181
run: find build -name *.h5 | xargs -n1 -I{} openPMD_check_h5 -i {}
182182

183-
- name: build ImpactX (SP) w/o running
183+
build_gcc_python_sp:
184+
name: GCC w/ SIMD / SP w/o MPI w/ Python
185+
runs-on: ubuntu-24.04
186+
if: github.event.pull_request.draft == false
187+
env:
188+
CMAKE_GENERATOR: Ninja
189+
CXXFLAGS: "-Werror"
190+
OMP_NUM_THREADS: 2
191+
steps:
192+
- name: Free More Disk Space
193+
uses: ax3l/free-disk-space@main
194+
with:
195+
tool-cache: false
196+
android: true
197+
dotnet: true
198+
haskell: true
199+
large-packages: false # apt takes ~1:30min
200+
docker-images: true
201+
swap-storage: false
202+
203+
- uses: actions/checkout@v5
204+
205+
- name: install dependencies
206+
run: |
207+
.github/workflows/dependencies/gcc.sh
208+
209+
- name: CCache Cache
210+
uses: actions/cache@v4
211+
# - once stored under a key, they become immutable (even if local cache path content changes)
212+
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
213+
with:
214+
path: |
215+
~/.ccache
216+
~/.cache/ccache
217+
key: ccache-openmp-pygcc-sp-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/ABLASTR.cmake') }}
218+
restore-keys: |
219+
ccache-openmp-pygcc-sp-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
220+
ccache-openmp-pygcc-sp-
221+
222+
- name: build ImpactX
184223
run: |
185-
cmake -S . -B build_sp \
224+
cmake -S . -B build \
186225
-DBUILD_SHARED_LIBS=ON \
187-
-DCMAKE_BUILD_TYPE=Release \
226+
-DCMAKE_BUILD_TYPE=Debug \
188227
-DCMAKE_INSTALL_PREFIX=$HOME/.local \
189228
-DCMAKE_VERBOSE_MAKEFILE=ON \
190229
-DImpactX_FFT=ON \
@@ -193,4 +232,30 @@ jobs:
193232
-DImpactX_PYTHON=ON \
194233
-DImpactX_SIMD=ON \
195234
-DImpactX_TEST_CLEANUP=ON
196-
cmake --build build_sp -j 4
235+
cmake --build build -j 4
236+
237+
- name: run tests
238+
run: |
239+
ctest --test-dir build --output-on-failure --label-exclude slow
240+
241+
- name: run installed app
242+
run: |
243+
cmake --build build --target install
244+
export PATH=$HOME/.local/bin:$PATH
245+
export LD_LIBRARY_PATH=$HOME/.local/lib:$LD_LIBRARY_PATH
246+
247+
impactx.NOMPI.OMP.SP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 1 || \
248+
{ cat Backtrace.0.0; exit 1; }
249+
impactx.NOMPI.OMP.SP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 2 || \
250+
{ cat Backtrace.0.0; exit 1; }
251+
impactx.NOMPI.OMP.SP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 3 || \
252+
{ cat Backtrace.0.0; exit 1; }
253+
254+
- name: run installed python module
255+
run: |
256+
cmake --build build --target pip_install
257+
258+
python3 examples/fodo/run_fodo.py
259+
260+
- name: validate created openPMD files
261+
run: find build -name *.h5 | xargs -n1 -I{} openPMD_check_h5 -i {}

0 commit comments

Comments
 (0)