Skip to content

AMReX: development #4179

AMReX: development

AMReX: development #4179

Workflow file for this run

name: 🐧 OpenMP
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-ubuntu
cancel-in-progress: true
jobs:
build_gcc:
name: GCC w/ MPI w/ Python
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
env:
CMAKE_GENERATOR: Ninja
CXXFLAGS: "-Werror"
OMP_NUM_THREADS: 2
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/gcc-openmpi.sh
- name: CCache Cache
uses: actions/cache@v4
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-openmp-gcc-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/ABLASTR.cmake') }}
restore-keys: |
ccache-openmp-gcc-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
ccache-openmp-gcc-
- name: system info
run: |
cat /proc/cpuinfo
lscpu
- name: build ImpactX
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DImpactX_FFT=ON \
-DImpactX_PYTHON=ON \
-DMPIEXEC_POSTFLAGS="--use-hwthread-cpus"
cmake --build build -j 4
- name: run tests
run: |
ctest --test-dir build --output-on-failure --label-exclude slow
- name: run installed app
run: |
sudo cmake --build build --target install
impactx.MPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 1 || \
{ cat Backtrace.0.0; exit 1; }
impactx.MPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 2 || \
{ cat Backtrace.0.0; exit 1; }
impactx.MPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 3 || \
{ cat Backtrace.0.0; exit 1; }
- name: run installed python module
run: |
cmake --build build --target pip_install
python3 examples/fodo/run_fodo.py
- name: validate created openPMD files
run: find build -name *.h5 | xargs -n1 -I{} openPMD_check_h5 -i {}
build_gcc_python:
name: GCC w/o MPI w/ Python
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
env:
CMAKE_GENERATOR: Ninja
CXXFLAGS: "-Werror"
OMP_NUM_THREADS: 2
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/gcc.sh
- name: CCache Cache
uses: actions/cache@v4
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-openmp-pygcc-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/ABLASTR.cmake') }}
restore-keys: |
ccache-openmp-pygcc-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
ccache-openmp-pygcc-
- name: build ImpactX
run: |
cmake -S . -B build \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DImpactX_FFT=ON \
-DImpactX_MPI=OFF \
-DImpactX_PYTHON=ON
cmake --build build -j 4
- name: run tests
run: |
ctest --test-dir build --output-on-failure --label-exclude slow
- name: run installed app
run: |
sudo cmake --build build --target install
impactx.NOMPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 1 || \
{ cat Backtrace.0.0; exit 1; }
impactx.NOMPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 2 || \
{ cat Backtrace.0.0; exit 1; }
impactx.NOMPI.OMP.DP.OPMD.DEBUG examples/fodo/input_fodo.in algo.particle_shape = 3 || \
{ cat Backtrace.0.0; exit 1; }
- name: run installed python module
run: |
cmake --build build --target pip_install
python3 examples/fodo/run_fodo.py
- name: validate created openPMD files
run: find build -name *.h5 | xargs -n1 -I{} openPMD_check_h5 -i {}