From b69a9847f7c6e0db6dc92dbde7c3d94d4b977c56 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Fri, 23 Aug 2024 14:40:07 -0500 Subject: [PATCH] add a config file for running regression tests in serial (no mpirun), modify run_tests.py to handle this case --- .github/workflows/quick-regression.yml | 2 +- tools/regression-tests/config_serial.yaml | 46 +++++++++++++++++++++++ tools/regression-tests/run_tests.py | 4 +- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 tools/regression-tests/config_serial.yaml diff --git a/.github/workflows/quick-regression.yml b/.github/workflows/quick-regression.yml index 2e44e24275..2726e70650 100644 --- a/.github/workflows/quick-regression.yml +++ b/.github/workflows/quick-regression.yml @@ -77,7 +77,7 @@ jobs: python3 tools/regression-tests/get-quick-list.py python3 tools/regression-tests/run_tests.py \ --lmp-bin=build/lmp \ - --config-file=tools/regression-tests/config.yaml \ + --config-file=tools/regression-tests/config_serial.yaml \ --list-input=folder_list.txt tar -cvf quick-regression-test.tar run.log progress.yaml diff --git a/tools/regression-tests/config_serial.yaml b/tools/regression-tests/config_serial.yaml new file mode 100644 index 0000000000..900e3d1736 --- /dev/null +++ b/tools/regression-tests/config_serial.yaml @@ -0,0 +1,46 @@ +--- + lmp_binary: "" + nprocs: "1" + args: "-cite none" + mpiexec: "" + mpiexec_numproc_flag: "" + tolerance: + PotEng: + abs: 1e-4 + rel: 1e-7 + TotEng: + abs: 1e-4 + rel: 1e-7 + Press: + abs: 1e-4 + rel: 1e-7 + Temp: + abs: 1e-4 + rel: 1e-7 + E_vdwl: + abs: 1e-3 + rel: 1e-7 + overrides: + in.rigid.tnr: + Temp: + abs: 1e-3 + rel: 1e-5 + Press: + abs: 1e-2 + rel: 1e-4 + skip: + [ in.rigid.poems3, + in.rigid.poems4, + in.rigid.poems5, + in.peptide, + in.voronoi, + in.voronoi.2d, + in.voronoi.data, + in.*_imd*, + in.bucky-plus-cnt*, + ] + + nugget: 1.0 + epsilon: 1e-16 + + diff --git a/tools/regression-tests/run_tests.py b/tools/regression-tests/run_tests.py index b2144478ec..4d9fdfaa22 100644 --- a/tools/regression-tests/run_tests.py +++ b/tools/regression-tests/run_tests.py @@ -710,7 +710,9 @@ def get_lammps_build_configuration(lmp_binary): - wrap subprocess with try/catch to handle exceptions ''' def execute(lmp_binary, config, input_file_name, generate_ref_yaml=False): - cmd_str = config['mpiexec'] + " " + config['mpiexec_numproc_flag'] + " " + config['nprocs'] + " " + cmd_str = "" + if config['mpiexec']: + cmd_str += config['mpiexec'] + " " + config['mpiexec_numproc_flag'] + " " + config['nprocs'] + " " cmd_str += lmp_binary + " -in " + input_file_name + " " + config['args'] logger.info(f" Executing: {cmd_str}") p = subprocess.run(cmd_str, shell=True, text=True, capture_output=True)