From ea28ea0293a08e8d397821c650e3796c92ab7eca Mon Sep 17 00:00:00 2001 From: Guillaume Raffy Date: Fri, 22 Nov 2024 16:00:18 +0100 Subject: [PATCH] fixed broken commit https://git.ipr.univ-rennes.fr/cellinfo/iprbench/commit/7976d67860b1ab394638c48685cd9d70115de070 --- iprbench/clusterbench.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/iprbench/clusterbench.py b/iprbench/clusterbench.py index 42cfe09..0dd8554 100755 --- a/iprbench/clusterbench.py +++ b/iprbench/clusterbench.py @@ -3,7 +3,7 @@ from typing import List, Tuple, Dict import argparse from os import getenv, makedirs -from .core import IBenchmark, BenchmarkConfig, BenchmarkId, ResultsDbParams +from .core import IBenchmark, BenchmarkConfig, BenchmarkId, ResultsDbParams, BenchParam from .main import BenchmarkFactory from .util import Singleton import shutil @@ -377,7 +377,6 @@ def main(): args = arg_parser.parse_args() benchmark_id = ClusterId(args.benchmark_id) - benchmark = BenchmarkFactory().create_benchmark(benchmark_id) results_dir = Path(args.results_dir) arch_regexp = args.arch_regexp @@ -386,6 +385,12 @@ def main(): cluster = ClusterFactory().create_cluster(args.cluster_id) resultsdb_params = json.loads(args.resultsdb_params) + # TODO: put the declaration of common params in a common function so that there is only one set of common parameters + common_params: List[BenchParam] = [] + common_params.append(BenchParam('launcher', BenchParam.Type.PARAM_TYPE_STRING, description='what triggered the benchmark (eg "alambix.job.12345", or "manual")')) + + benchmark = BenchmarkFactory().create_benchmark(benchmark_id, common_params) + if not cluster.path_is_reachable_by_compute_nodes(results_dir): raise ValueError('the results path is expected to be on a disk that is accessible to all cluster nodes, and it doesn\'t seem to be the case for {results_dir}')