From 7c08a5c725d86d47ae9759352c4121e2e8fb7fb9 Mon Sep 17 00:00:00 2001 From: EdmundGoodman Date: Sun, 25 Feb 2024 19:58:42 +0000 Subject: [PATCH] Minor code tweaks --- src/hpc_multibench/run_configuration.py | 3 ++- src/hpc_multibench/test_bench.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hpc_multibench/run_configuration.py b/src/hpc_multibench/run_configuration.py index 51f93b8..7cc6f7b 100755 --- a/src/hpc_multibench/run_configuration.py +++ b/src/hpc_multibench/run_configuration.py @@ -12,6 +12,7 @@ SHELL_SHEBANG = "#!/bin/sh\n" SLURM_JOB_ID_REGEX = r"Submitted batch job (\d+)" SLURM_UNQUEUED_SUBSTRING = "Invalid job id specified" +TIME_COMMAND = "time -p " class RunConfiguration: @@ -69,7 +70,7 @@ def sbatch_contents(self) -> str: sbatch_file += "\n".join(self.build_commands) + "\n" sbatch_file += "\necho '===== RUN ====='\n" - sbatch_file += f"time -p {self.run_command} {self.args}\n" + sbatch_file += f"{TIME_COMMAND}{self.run_command} {self.args}\n" return sbatch_file diff --git a/src/hpc_multibench/test_bench.py b/src/hpc_multibench/test_bench.py index 7394ac1..a804647 100755 --- a/src/hpc_multibench/test_bench.py +++ b/src/hpc_multibench/test_bench.py @@ -202,6 +202,7 @@ def extract_metrics(self, output: str) -> dict[str, str] | None: def report(self) -> None: """Analyse completed run configurations for the test bench.""" + print(f"Reporting data from test bench '{self.name}'") if self.run_configurations_metadata is None: print(f"Metadata file does not exist for test bench '{self.name}'!") return