diff --git a/.github/workflows/kokkos-regression.yaml b/.github/workflows/kokkos-regression.yaml index 0756b080b0..a475c1eb7b 100644 --- a/.github/workflows/kokkos-regression.yaml +++ b/.github/workflows/kokkos-regression.yaml @@ -2,7 +2,7 @@ name: "Kokkos OpenMP Regression Test" on: - pull_request: + push: branches: - develop @@ -17,9 +17,9 @@ jobs: env: CCACHE_DIR: ${{ github.workspace }}/.ccache strategy: - max-parallel: 4 + max-parallel: 6 matrix: - idx: [ 'pair', 'fix', 'compute', 'misc' ] + idx: [ 'pair-0', 'pair-1', 'fix-0', 'fix-1', 'compute', 'misc' ] steps: - name: Checkout repository @@ -83,6 +83,7 @@ jobs: -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 @@ -93,9 +94,10 @@ jobs: run: | source linuxenv/bin/activate python3 tools/regression-tests/get_kokkos_input.py \ - --examples-top-level=examples \ - --filter-out="balance;fire;gcmc;granregion;mdi;mliap;neb;pace;prd;pour;python;snap" + --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 \ @@ -103,7 +105,7 @@ jobs: --output-file=output-${{ matrix.idx }}.xml \ --progress-file=progress-${{ matrix.idx }}.yaml \ --log-file=run-${{ matrix.idx }}.log \ - --quick-max=100 --verbose + --quick-max=100 tar -cvf kokkos-regression-test-${{ matrix.idx }}.tar run-${{ matrix.idx }}.log progress-${{ matrix.idx }}.yaml output-${{ matrix.idx }}.xml diff --git a/tools/regression-tests/get_kokkos_input.py b/tools/regression-tests/get_kokkos_input.py index c03a813456..f94ca42c8e 100644 --- a/tools/regression-tests/get_kokkos_input.py +++ b/tools/regression-tests/get_kokkos_input.py @@ -7,6 +7,7 @@ # These 4 files will be read in by the regression tester run_tests.py from argparse import ArgumentParser +import random import subprocess import sys @@ -55,20 +56,37 @@ if __name__ == "__main__": parser = ArgumentParser() parser.add_argument("--examples-top-level", dest="example_toplevel", default="", help="Examples top-level") parser.add_argument("--filter-out", dest="filter_out", default="", help="Filter out input scripts that contain strings") + parser.add_argument("--batch-size", dest="batch_size", default=50, help="Batch size of scripts per input list") args = parser.parse_args() example_toplevel = args.example_toplevel filter_out = args.filter_out.split(";") - + batch_size = int(args.batch_size) + # print the list of the input scripts that has each feature to a separate file features = [ 'pair', 'fix', 'compute' ] for feature in features: input_list = [] generate_list(feature, example_toplevel, filter_out, input_list) - with open(f"input-list-{feature}-kk.txt", "w") as f: - for input in input_list: - if input != "": - f.write(f"{input}\n") + + num_batches = int(len(input_list) / batch_size) + if num_batches < 2: + with open(f"input-list-{feature}-kk.txt", "w") as f: + for input in input_list: + if input != "": + f.write(f"{input}\n") + else: + for idx in range(num_batches): + with open(f"input-list-{feature}-{idx}-kk.txt", "w") as f: + if len(input_list) > batch_size: + sampled = random.sample(input_list, batch_size) + else: + sampled = input_list + for input in sampled: + if input != "": + if input in input_list: + input_list.remove(input) + f.write(f"{input}\n") # combine the list of the input scripts that have these feature to a single file input-list-misc-kk.txt features = [ 'angle', 'bond', 'dihedral', 'improper', 'min' ]