add a config file for running regression tests in serial (no mpirun), modify run_tests.py to handle this case

This commit is contained in:
Trung Nguyen
2024-08-23 14:40:07 -05:00
parent e1b324a3e9
commit b69a9847f7
3 changed files with 50 additions and 2 deletions

View File

@ -77,7 +77,7 @@ jobs:
python3 tools/regression-tests/get-quick-list.py python3 tools/regression-tests/get-quick-list.py
python3 tools/regression-tests/run_tests.py \ python3 tools/regression-tests/run_tests.py \
--lmp-bin=build/lmp \ --lmp-bin=build/lmp \
--config-file=tools/regression-tests/config.yaml \ --config-file=tools/regression-tests/config_serial.yaml \
--list-input=folder_list.txt --list-input=folder_list.txt
tar -cvf quick-regression-test.tar run.log progress.yaml tar -cvf quick-regression-test.tar run.log progress.yaml

View File

@ -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

View File

@ -710,7 +710,9 @@ def get_lammps_build_configuration(lmp_binary):
- wrap subprocess with try/catch to handle exceptions - wrap subprocess with try/catch to handle exceptions
''' '''
def execute(lmp_binary, config, input_file_name, generate_ref_yaml=False): 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'] cmd_str += lmp_binary + " -in " + input_file_name + " " + config['args']
logger.info(f" Executing: {cmd_str}") logger.info(f" Executing: {cmd_str}")
p = subprocess.run(cmd_str, shell=True, text=True, capture_output=True) p = subprocess.run(cmd_str, shell=True, text=True, capture_output=True)