diff --git a/.github/workflows/kokkos-regression.yaml b/.github/workflows/kokkos-regression.yaml index 0756b080b0..5cde7d67f2 100644 --- a/.github/workflows/kokkos-regression.yaml +++ b/.github/workflows/kokkos-regression.yaml @@ -17,9 +17,9 @@ jobs: env: CCACHE_DIR: ${{ github.workspace }}/.ccache strategy: - max-parallel: 4 + max-parallel: 5 matrix: - idx: [ 'pair', 'fix', 'compute', 'misc' ] + idx: [ 'pair-0', 'pair-1', 'fix', 'compute', 'misc' ] steps: - name: Checkout repository @@ -93,8 +93,10 @@ jobs: run: | source linuxenv/bin/activate python3 tools/regression-tests/get_kokkos_input.py \ - --examples-top-level=examples \ + --examples-top-level=examples --batch-size=100 \ --filter-out="balance;fire;gcmc;granregion;mdi;mliap;neb;pace;prd;pour;python;snap" + cat input-list-fix-1-kk.txt >> input-list-fix-0-kk.txt + mv input-list-fix-0-kk.txt input-list-fix-kk.txt python3 tools/regression-tests/run_tests.py \ --lmp-bin=build/lmp \ diff --git a/tools/regression-tests/get_kokkos_input.py b/tools/regression-tests/get_kokkos_input.py index c03a813456..ca4108a9ec 100644 --- a/tools/regression-tests/get_kokkos_input.py +++ b/tools/regression-tests/get_kokkos_input.py @@ -55,20 +55,35 @@ 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 - 1) / 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: + start = idx * batch_size + for i in range(batch_size): + if start + i < len(input_list): + input = input_list[start + i] + if 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' ]