Skip to content

Commit

Permalink
[FIX] MPI to be string if present
Browse files Browse the repository at this point in the history
  • Loading branch information
kaanolgu committed Mar 25, 2024
1 parent 49f2286 commit aed6bc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmarks/modules/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}\')"')

Expand Down

0 comments on commit aed6bc2

Please sign in to comment.