skip in.min.box, ensure that input lists only contain unique entries
This commit is contained in:
@ -28,6 +28,10 @@
|
||||
Press:
|
||||
abs: 1e-2
|
||||
rel: 1e-4
|
||||
skip:
|
||||
[
|
||||
in.min.box,
|
||||
]
|
||||
|
||||
timeout: 180
|
||||
nugget: 1.0
|
||||
|
||||
@ -28,7 +28,7 @@ def generate_list(in_style, example_toplevel, filter_out, output_list):
|
||||
|
||||
for style in style_names:
|
||||
# find in the in. script a line with "pair_style [name]"
|
||||
if in_style == "pair":
|
||||
if in_style == "pair" or in_style == "angle" or in_style == "bond" or in_style == "dihedral" or in_style == "improper":
|
||||
cmd_str = f"grep -rl '{in_style}_style.*{style}' {example_toplevel}/*/in.* "
|
||||
else:
|
||||
# find in the in. script a line with "fix ... [name]" (or "compute ... [name]")
|
||||
@ -37,7 +37,6 @@ def generate_list(in_style, example_toplevel, filter_out, output_list):
|
||||
p = subprocess.run(cmd_str, shell=True, text=True, capture_output=True)
|
||||
input_list = p.stdout.split('\n')
|
||||
input_list = ' '.join(input_list).split()
|
||||
#print(f"There are {len(input_list)} input files that contains {in_style} {style}")
|
||||
for input in input_list:
|
||||
if input != "":
|
||||
skip = False
|
||||
@ -48,6 +47,7 @@ def generate_list(in_style, example_toplevel, filter_out, output_list):
|
||||
if skip == True:
|
||||
continue
|
||||
else:
|
||||
if input not in output_list:
|
||||
output_list.append(input)
|
||||
|
||||
|
||||
@ -80,3 +80,4 @@ if __name__ == "__main__":
|
||||
for input in input_list:
|
||||
if input != "":
|
||||
f.write(f"{input}\n")
|
||||
|
||||
|
||||
@ -305,8 +305,8 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
||||
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}.")
|
||||
logger.info(f" Using {config['nprocs']} nprocs for {input_test} as enforced in the config file.")
|
||||
logger.info(f" WARNING: The maximum number of procs found from the reference log files is {max_np}.")
|
||||
|
||||
# store the value of nprocs to name the generated log file
|
||||
nprocs = int(config['nprocs'])
|
||||
|
||||
Reference in New Issue
Block a user