submit merge job

This commit is contained in:
Benoît Sierro
2021-06-14 13:47:45 +02:00
parent bbe038a95a
commit 611342d910
2 changed files with 11 additions and 5 deletions

View File

@@ -254,7 +254,7 @@ def num_left_to_propagate(sub_folder: Path, init_z_num: int) -> int:
def find_last_spectrum_num(data_dir: Path):
for num in itertools.count(1):
p_to_test = data_dir / SPEC1_FN.format(num)
if not p_to_test.is_file() or len(p_to_test.read_bytes()) == 0:
if not p_to_test.is_file() or os.path.getsize(p_to_test) == 0:
return num - 1

View File

@@ -107,7 +107,7 @@ def copy_starting_files():
def main():
command_map = dict(run="Propagate", resume="Resuming")
command_map = dict(run="Propagate", resume="Resuming", merge="Merging")
parser = create_parser()
template = Paths.gets("submit_job_template")
@@ -121,6 +121,12 @@ def main():
"time format must be an integer number of minute or must match the pattern hh:mm:ss"
)
if args.command == "merge":
final_config = args.configs[0]
sim_num = 0
args.nodes = 1
args.cpus_per_node = 1
else:
config_paths = args.configs
final_config, sim_num = validate_config_sequence(*config_paths)