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

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