From aed6bc299724984e8fa16eba63ccff305eb69633 Mon Sep 17 00:00:00 2001 From: Kaan Olgu Date: Mon, 25 Mar 2024 11:38:23 +0000 Subject: [PATCH] [FIX] MPI to be string if present --- benchmarks/modules/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/modules/utils.py b/benchmarks/modules/utils.py index d5da0a9d..64701fd6 100644 --- a/benchmarks/modules/utils.py +++ b/benchmarks/modules/utils.py @@ -271,7 +271,7 @@ def setup_spack_environment(self): cmd_spack_spec_dict = 'from spack import environment;\ spec_list = environment.active_environment().concrete_roots();\ key_list_for_each = [spec.variants.dict.keys() for spec in spec_list];\ - result_dict = {spec.name: {"compiler": {"name": spec.compiler.name, "version": str(spec.compiler.versions).lstrip("=")}, "variants": {key: str(spec.variants.dict[key].value) if isinstance(spec.variants.dict[key].value, bool) else "" if spec.variants.dict[key].value is None else list(spec.variants.dict[key].value) if isinstance(spec.variants.dict[key].value, tuple) else spec.variants.dict[key].value for key in key_list_for_each[i]},"mpi":spec["mpi"] if "mpi" in spec else "" } for i, spec in enumerate(spec_list)};\ + result_dict = {spec.name: {"compiler": {"name": spec.compiler.name, "version": str(spec.compiler.versions).lstrip("=")}, "variants": {key: str(spec.variants.dict[key].value) if isinstance(spec.variants.dict[key].value, bool) else "" if spec.variants.dict[key].value is None else list(spec.variants.dict[key].value) if isinstance(spec.variants.dict[key].value, tuple) else spec.variants.dict[key].value for key in key_list_for_each[i]},"mpi":str(spec["mpi"]) if "mpi" in spec else "" } for i, spec in enumerate(spec_list)};\ print(result_dict)' self.postrun_cmds.append(f'echo "spack_spec_dict: $(spack -e {self.build_system.environment} python -c \'{cmd_spack_spec_dict}\')"')