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