From c9bddb08d789449a7a134e8367725e56f00c93b3 Mon Sep 17 00:00:00 2001 From: Mayeul Aubin Date: Fri, 14 Mar 2025 11:45:26 +0100 Subject: [PATCH] independent scola progress bar --- progress_bar.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 progress_bar.py diff --git a/progress_bar.py b/progress_bar.py new file mode 100644 index 0000000..5155b20 --- /dev/null +++ b/progress_bar.py @@ -0,0 +1,15 @@ +if __name__ == "__main__": + from argparse import ArgumentParser + from tqdm import tqdm + from low_level import progress_bar_from_logfile + + parser = ArgumentParser(description="Progress bar from log files.") + parser.add_argument("-l","--logdir", type=str, help="Log directory.") + parser.add_argument("-s","--simname", type=str, help="Simulation name.") + parser.add_argument("-n","--N_tiles", type=int, help="Number of tiles.") + parser.add_argument("-v","--verbose", type=int, default=1, help="Verbose level.") + + parsed_args = parser.parse_args() + + for b in tqdm(range(1,parsed_args.N_tiles**3+1), desc="sCOLA", unit="box", disable=(parsed_args.verbose==0)): + progress_bar_from_logfile(parsed_args.logdir+parsed_args.simname+".log_"+str(b), desc=f"Box {b}/{parsed_args.N_tiles**3}", verbose=parsed_args.verbose, leave=False) \ No newline at end of file