Skip to content

Commit

Permalink
Minor code tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
EdmundGoodman committed Feb 25, 2024
1 parent 420d055 commit 7c08a5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hpc_multibench/run_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/hpc_multibench/test_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7c08a5c

Please sign in to comment.