test logic to run with different nprocs than the ref files if nprocs is specified
This commit is contained in:
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
lmp_binary: ""
|
lmp_binary: ""
|
||||||
nprocs: "4"
|
nprocs: "2"
|
||||||
args: "-cite none -k on g 2 -sf kk -pk kokkos newton on neigh half"
|
args: "-cite none -k on g 2 -sf kk -pk kokkos newton on neigh half"
|
||||||
mpiexec: "mpirun"
|
mpiexec: "mpirun"
|
||||||
mpiexec_numproc_flag: "--host localhost:4 -np"
|
mpiexec_numproc_flag: "--host localhost:2 -np"
|
||||||
tolerance:
|
tolerance:
|
||||||
PotEng:
|
PotEng:
|
||||||
abs: 1e-4
|
abs: 1e-4
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
lmp_binary: ""
|
lmp_binary: ""
|
||||||
nprocs: "4"
|
nprocs: "2"
|
||||||
args: "-cite none -k on t 2 -sf kk -pk kokkos newton on neigh half"
|
args: "-cite none -k on t 2 -sf kk -pk kokkos newton on neigh half"
|
||||||
mpiexec: "mpirun"
|
mpiexec: "mpirun"
|
||||||
mpiexec_numproc_flag: "--host localhost:4 -np"
|
mpiexec_numproc_flag: "--host localhost:2 -np"
|
||||||
tolerance:
|
tolerance:
|
||||||
PotEng:
|
PotEng:
|
||||||
abs: 1e-4
|
abs: 1e-4
|
||||||
|
|||||||
@ -300,12 +300,15 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
|||||||
|
|
||||||
saved_nprocs = config['nprocs']
|
saved_nprocs = config['nprocs']
|
||||||
|
|
||||||
# if the maximum number of procs is different from the value in the configuration file
|
# if the nprocs value in the configuration file is empty then use max_np for this particular input script
|
||||||
# then override the setting for this particular input script
|
if config['nprocs'] == "":
|
||||||
if max_np != int(config['nprocs']):
|
|
||||||
config['nprocs'] = str(max_np)
|
config['nprocs'] = str(max_np)
|
||||||
|
else:
|
||||||
|
# otherwise use the nprocs value in the configuration file (4 for most examples)
|
||||||
|
logger.info(f" Using nprocs {config['nprocs']} nprocs for {input_test} as specified in the config file.")
|
||||||
|
logger.info(f" The maximum number of procs in the log files is {max_np}.")
|
||||||
|
|
||||||
# store the value of nprocs
|
# store the value of nprocs to name the generated log file
|
||||||
nprocs = int(config['nprocs'])
|
nprocs = int(config['nprocs'])
|
||||||
|
|
||||||
# if valgrind is used for mem check, the run command will be
|
# if valgrind is used for mem check, the run command will be
|
||||||
|
|||||||
Reference in New Issue
Block a user