Merge pull request #4387 from akohlmey/next_release #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub action to build LAMMPS on Linux and run selected regression tests | |
name: "Kokkos OpenMP Regression Test" | |
on: | |
push: | |
branches: | |
- develop | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build LAMMPS with Kokkos OpenMP | |
# restrict to official LAMMPS repository | |
if: ${{ github.repository == 'lammps/lammps' }} | |
runs-on: ubuntu-latest | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
strategy: | |
max-parallel: 6 | |
matrix: | |
idx: [ 'pair-0', 'pair-1', 'fix-0', 'fix-1', 'compute', 'misc' ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
show-progress: false | |
- name: Install extra packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ccache ninja-build libeigen3-dev \ | |
libcurl4-openssl-dev python3-dev \ | |
mpi-default-bin mpi-default-dev | |
- name: Create Build Environment | |
run: mkdir build | |
- name: Set up ccache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: linux-kokkos-ccache-${{ github.sha }} | |
restore-keys: linux-kokkos-ccache- | |
- name: Building LAMMPS via CMake | |
shell: bash | |
run: | | |
ccache -z | |
python3 -m venv linuxenv | |
source linuxenv/bin/activate | |
python3 -m pip install --upgrade pip | |
python3 -m pip install numpy pyyaml junit_xml | |
cmake -S cmake -B build \ | |
-C cmake/presets/gcc.cmake \ | |
-C cmake/presets/basic.cmake \ | |
-C cmake/presets/kokkos-openmp.cmake \ | |
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-D CMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-D BUILD_SHARED_LIBS=off \ | |
-D DOWNLOAD_POTENTIALS=off \ | |
-D PKG_AMOEBA=on \ | |
-D PKG_ASPHERE=on \ | |
-D PKG_BROWNIAN=on \ | |
-D PKG_CLASS2=on \ | |
-D PKG_COLLOID=on \ | |
-D PKG_CORESHELL=on \ | |
-D PKG_DIPOLE=on \ | |
-D PKG_DPD-BASIC=on \ | |
-D PKG_EXTRA-COMPUTE=on \ | |
-D PKG_EXTRA-FIX=on \ | |
-D PKG_EXTRA-MOLECULE=on \ | |
-D PKG_EXTRA-PAIR=on \ | |
-D PKG_GRANULAR=on \ | |
-D PKG_LEPTON=on \ | |
-D PKG_MC=on \ | |
-D PKG_MEAM=on \ | |
-D PKG_POEMS=on \ | |
-D PKG_PYTHON=on \ | |
-D PKG_QEQ=on \ | |
-D PKG_REAXFF=on \ | |
-D PKG_REPLICA=on \ | |
-D PKG_SRD=on \ | |
-D PKG_SPH=on \ | |
-D PKG_VORONOI=on \ | |
-G Ninja | |
cmake --build build | |
ccache -s | |
- name: Run Regression Tests for Selected Examples | |
shell: bash | |
run: | | |
source linuxenv/bin/activate | |
python3 tools/regression-tests/get_kokkos_input.py \ | |
--examples-top-level=examples --batch-size=50 \ | |
--filter-out="balance;fire;gcmc;granregion;hyper;mc;mdi;mliap;neb;pace;prd;pour;python;rigid;snap;streitz;shear;ttm" | |
export OMP_PROC_BIND=false | |
python3 tools/regression-tests/run_tests.py \ | |
--lmp-bin=build/lmp \ | |
--config-file=tools/regression-tests/config_kokkos_openmp.yaml \ | |
--list-input=input-list-${{ matrix.idx }}-kk.txt \ | |
--output-file=output-${{ matrix.idx }}.xml \ | |
--progress-file=progress-${{ matrix.idx }}.yaml \ | |
--log-file=run-${{ matrix.idx }}.log \ | |
--quick-max=100 | |
tar -cvf kokkos-regression-test-${{ matrix.idx }}.tar run-${{ matrix.idx }}.log progress-${{ matrix.idx }}.yaml output-${{ matrix.idx }}.xml | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: kokkos-regression-test-artifact-${{ matrix.idx }} | |
path: kokkos-regression-test-${{ matrix.idx }}.tar | |
merge: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Merge Artifacts | |
uses: actions/upload-artifact/merge@v4 | |
with: | |
name: merged-kokkos-regresssion-artifact | |
pattern: kokkos-regression-test-artifact-* |