Commit e66b55ba authored by Lorenz Hüdepohl's avatar Lorenz Hüdepohl
Browse files

Fix openmpi_flavor macro for cuda-aware repos

parent 8743e622
Pipeline #114393 passed with stage
in 10 seconds
...@@ -620,6 +620,11 @@ def openmpi_flavor_dependencies(flavor, distribution): ...@@ -620,6 +620,11 @@ def openmpi_flavor_dependencies(flavor, distribution):
return () return ()
def openmpi_flavor_kind(flavor):
import re
return re.sub("(_[0-9]+)*$", "", flavor)
def mpcdf_setup_subproject(api_url, project, distribution, microarchitecture, def mpcdf_setup_subproject(api_url, project, distribution, microarchitecture,
parent=None, dry_run=False, diff=False, remove_old=False, remove_old_matching=None, all_possible=False, only_project=False): parent=None, dry_run=False, diff=False, remove_old=False, remove_old_matching=None, all_possible=False, only_project=False):
import re import re
...@@ -810,10 +815,9 @@ Macros: ...@@ -810,10 +815,9 @@ Macros:
dependencies = ((project, compiler),) dependencies = ((project, compiler),)
if not parent: if not parent:
dependencies = openmpi_flavor_dependencies(of, distribution) + dependencies dependencies = openmpi_flavor_dependencies(of, distribution) + dependencies
flavor_kind = re.sub("(_[0-9]+)*$", "", of)
repo(mpi + "_" + compiler + "_" + of, dependencies, mpi=True, repo(mpi + "_" + compiler + "_" + of, dependencies, mpi=True,
mpi_repository=mpi, mpi_module=mpi_module(mpi), mpi_repository=mpi, mpi_module=mpi_module(mpi),
openmpi_flavor=flavor_kind) openmpi_flavor=openmpi_flavor_kind(of))
for cuda in cudas: for cuda in cudas:
for compiler in filter(partial(valid_cuda, cuda), compilers): for compiler in filter(partial(valid_cuda, cuda), compilers):
...@@ -837,7 +841,8 @@ Macros: ...@@ -837,7 +841,8 @@ Macros:
dependencies = openmpi_flavor_dependencies(of, distribution) + dependencies dependencies = openmpi_flavor_dependencies(of, distribution) + dependencies
repo(cuda + "_aware_" + mpi + "_" + compiler + "_" + of, repo(cuda + "_aware_" + mpi + "_" + compiler + "_" + of,
dependencies, dependencies,
cuda_aware_mpi=True, openmpi_flavor=of, cuda_aware_mpi=True,
openmpi_flavor=openmpi_flavor_kind(of),
additional_tags=("Prefer: mpcdf_" + cuda,)) additional_tags=("Prefer: mpcdf_" + cuda,))
if old_repos: if old_repos:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment