submit merge job
This commit is contained in:
@@ -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):
|
def find_last_spectrum_num(data_dir: Path):
|
||||||
for num in itertools.count(1):
|
for num in itertools.count(1):
|
||||||
p_to_test = data_dir / SPEC1_FN.format(num)
|
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
|
return num - 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ def copy_starting_files():
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
command_map = dict(run="Propagate", resume="Resuming")
|
command_map = dict(run="Propagate", resume="Resuming", merge="Merging")
|
||||||
|
|
||||||
parser = create_parser()
|
parser = create_parser()
|
||||||
template = Paths.gets("submit_job_template")
|
template = Paths.gets("submit_job_template")
|
||||||
@@ -121,10 +121,16 @@ def main():
|
|||||||
"time format must be an integer number of minute or must match the pattern hh:mm:ss"
|
"time format must be an integer number of minute or must match the pattern hh:mm:ss"
|
||||||
)
|
)
|
||||||
|
|
||||||
config_paths = args.configs
|
if args.command == "merge":
|
||||||
final_config, sim_num = validate_config_sequence(*config_paths)
|
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)
|
||||||
|
|
||||||
args.nodes, args.cpus_per_node = distribute(sim_num, args.nodes, args.cpus_per_node)
|
args.nodes, args.cpus_per_node = distribute(sim_num, args.nodes, args.cpus_per_node)
|
||||||
|
|
||||||
submit_path = Path(
|
submit_path = Path(
|
||||||
"submit " + final_config.name + "-" + format(datetime.now(), "%Y%m%d%H%M") + ".sh"
|
"submit " + final_config.name + "-" + format(datetime.now(), "%Y%m%d%H%M") + ".sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user