From fd2a1413ab09cd910c63965c8474a3a6b0fbdf42 Mon Sep 17 00:00:00 2001 From: EdmundGoodman Date: Sun, 25 Feb 2024 18:54:54 +0000 Subject: [PATCH] Switch default flags for record --- src/hpc_multibench/main.py | 12 ++++++------ src/hpc_multibench/test_bench.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hpc_multibench/main.py b/src/hpc_multibench/main.py index df41d5b..2b5b751 100755 --- a/src/hpc_multibench/main.py +++ b/src/hpc_multibench/main.py @@ -36,16 +36,16 @@ def get_parser() -> ArgumentParser: # pragma: no cover help="print but don't submit the generated sbatch files", ) parser_record.add_argument( - "-n", - "--no-wait", + "-w", + "--wait", action="store_true", - help="don't wait for the submitted jobs to finish to exit", + help="wait for the submitted jobs to finish to exit", ) parser_record.add_argument( - "-c", - "--clobber", + "-nc", + "--no-clobber", action="store_true", - help="delete any previous run results of the test benches", + help="don't delete any previous run results of the test benches", ) _parser_report = sub_parsers.add_parser( "report", help="report analysis about completed test bench runs" diff --git a/src/hpc_multibench/test_bench.py b/src/hpc_multibench/test_bench.py index 7d68f1d..36f0823 100755 --- a/src/hpc_multibench/test_bench.py +++ b/src/hpc_multibench/test_bench.py @@ -148,7 +148,7 @@ def record(self, args: Namespace) -> None: print(f"Recording data from test bench '{self.name}'") # Optionally clobber directory - if args.clobber: + if not args.no_clobber: rmtree(self.output_directory) # Realise run configurations from list of instantiations @@ -182,7 +182,7 @@ def record(self, args: Namespace) -> None: if job_id is not None ] - if not args.no_wait: + if args.wait: raise NotImplementedError("Waiting for queue not yet implemented") def extract_metrics(self, output: str) -> dict[str, str] | None: