From 3974b35488c2100140fe14f3102c902c8c0b3799 Mon Sep 17 00:00:00 2001 From: Noe brucy Date: Wed, 8 May 2019 12:12:43 +0200 Subject: [PATCH] occigen modif --- pipeline_disk.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pipeline_disk.py b/pipeline_disk.py index 26fbfa6..737e8a5 100644 --- a/pipeline_disk.py +++ b/pipeline_disk.py @@ -9,8 +9,8 @@ import time import disk_postprocess as dp -storage_in = "/drf/projets/alfven-data/" -storage_out = "/dsm/anais/storageA/" +storage_in = "/home/nbrucy/simus/" +storage_out = "/home/nbrucy/visus/" parser = argparse.ArgumentParser() parser.add_argument("runs", help="name of runs", nargs="*", default=["015_iso"]) @@ -39,6 +39,9 @@ parser.add_argument( parser.add_argument( "-w", "--watch", help="wait and watch for missing outputs", action="store_true" ) + +parser.add_argument("--skip", help="skip failed loadings", action="store_true") + parser.add_argument( "-wt", "--waiting_time", @@ -83,9 +86,6 @@ parser.add_argument("--dpi", help="Resolution of the output", type=int, default= args = parser.parse_args() - -user = "nbrucy" -folder = "simus" project = args.project runs = args.runs @@ -101,14 +101,17 @@ dp.P.rcParams["savefig.dpi"] = args.dpi for run in runs: - path_suffix = user + "/" + folder + "/" + project + "/" + run + path_suffix = project + "/" + run path_in = storage_in + path_suffix path_out = storage_out + path_suffix if not os.path.exists(path_out): os.makedirs(path_out) - copy(path_in + "/disk.nml", path_out) - copy(path_in + "/output_00001/compilation.txt", path_out) + try: + copy(path_in + "/disk.nml", path_out) + copy(path_in + "/output_00001/compilation.txt", path_out) + except: + pass for i in range(first, last + 1, step): failures = 0 @@ -157,5 +160,7 @@ for run in runs: ) ) time.sleep(args.waiting_time) + elif args.skip: + break else: raise