Skip to content
Snippets Groups Projects
Commit 8ad7caa0 authored by Tobias Melson's avatar Tobias Melson
Browse files

Fix compiler selection in enable_repositories

parent 179405bc
No related branches found
No related tags found
No related merge requests found
Pipeline #239377 passed
...@@ -7,6 +7,7 @@ import textwrap ...@@ -7,6 +7,7 @@ import textwrap
import urllib import urllib
from typing import Optional from typing import Optional
from functools import partial from functools import partial
from itertools import chain
from xml.etree import ElementTree from xml.etree import ElementTree
if sys.version_info[0] < 3: if sys.version_info[0] < 3:
...@@ -688,12 +689,12 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run= ...@@ -688,12 +689,12 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
enable(mpi + "_" + compiler + "_" + of) enable(mpi + "_" + compiler + "_" + of)
if flag == "cuda": if flag == "cuda":
for cuda, compiler in product(actual_cudas(), all_compilers + all_pgis): for cuda, compiler in product(actual_cudas(), chain(actual_compilers(), actual_pgis())):
if valid_cuda(cuda, compiler): if valid_cuda(cuda, compiler):
enable(cuda + "_" + compiler) enable(cuda + "_" + compiler)
if flag == "cuda_mpi": if flag == "cuda_mpi":
for cuda, mpi, compiler in product(actual_cudas(), actual_mpis(), all_compilers): for cuda, mpi, compiler in product(actual_cudas(), actual_mpis(), actual_compilers()):
if valid_cuda(cuda, compiler) and valid_mpi(compiler, mpi): if valid_cuda(cuda, compiler) and valid_mpi(compiler, mpi):
enable(cuda + "_" + mpi + "_" + compiler) enable(cuda + "_" + mpi + "_" + compiler)
...@@ -707,22 +708,22 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run= ...@@ -707,22 +708,22 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
enable(mpi + "_" + amd) enable(mpi + "_" + amd)
if flag == "rocm": if flag == "rocm":
for rocm, compiler in product(actual_rocms(), all_compilers + all_amds): for rocm, compiler in product(actual_rocms(), chain(actual_compilers(), actual_amds())):
if valid_rocm(compiler): if valid_rocm(compiler):
enable(rocm + "_" + compiler) enable(rocm + "_" + compiler)
if flag == "rocm_mpi": if flag == "rocm_mpi":
for rocm, mpi, compiler in product(actual_rocms(), actual_mpis(), all_compilers + all_amds): for rocm, mpi, compiler in product(actual_rocms(), actual_mpis(), chain(actual_compilers(), actual_amds())):
if valid_rocm(compiler) and is_openmpi(mpi) and valid_mpi(compiler, mpi): if valid_rocm(compiler) and is_openmpi(mpi) and valid_mpi(compiler, mpi):
enable(rocm + "_" + mpi + "_" + compiler) enable(rocm + "_" + mpi + "_" + compiler)
if flag == "rocm_aware_mpi": if flag == "rocm_aware_mpi":
for rocm, mpi, compiler in product(actual_rocms(), actual_mpis(), all_compilers + all_amds): for rocm, mpi, compiler in product(actual_rocms(), actual_mpis(), chain(actual_compilers(), actual_amds())):
if valid_rocm(compiler) and is_openmpi(mpi) and valid_mpi(compiler, mpi): if valid_rocm(compiler) and is_openmpi(mpi) and valid_mpi(compiler, mpi):
enable(rocm + "_aware_" + mpi + "_" + compiler) enable(rocm + "_aware_" + mpi + "_" + compiler)
if flag == "rocm_aware_openmpi_flavors": if flag == "rocm_aware_openmpi_flavors":
for rocm, mpi, compiler in product(actual_rocms(), actual_mpis(), all_compilers + all_amds): for rocm, mpi, compiler in product(actual_rocms(), actual_mpis(), chain(actual_compilers(), actual_amds())):
if valid_rocm(compiler) and is_openmpi(mpi) and valid_mpi(compiler, mpi): if valid_rocm(compiler) and is_openmpi(mpi) and valid_mpi(compiler, mpi):
for of in actual_openmpi_flavors(): for of in actual_openmpi_flavors():
enable(rocm + "_aware_" + mpi + "_" + compiler + "_" + of) enable(rocm + "_aware_" + mpi + "_" + compiler + "_" + of)
...@@ -737,12 +738,12 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run= ...@@ -737,12 +738,12 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False, dry_run=
enable(mpi + "_" + pgi) enable(mpi + "_" + pgi)
if flag == "cuda_aware_mpi": if flag == "cuda_aware_mpi":
for cuda, mpi, compiler in product(actual_cudas(), actual_mpis(), all_compilers + all_pgis): for cuda, mpi, compiler in product(actual_cudas(), actual_mpis(), chain(actual_compilers(), actual_pgis())):
if "openmpi" in mpi and valid_cuda(cuda, compiler) and valid_mpi(compiler, mpi): if "openmpi" in mpi and valid_cuda(cuda, compiler) and valid_mpi(compiler, mpi):
enable(cuda + "_aware_" + mpi + "_" + compiler) enable(cuda + "_aware_" + mpi + "_" + compiler)
if flag == "cuda_aware_openmpi_flavors": if flag == "cuda_aware_openmpi_flavors":
for cuda, mpi, compiler in product(actual_cudas(), actual_mpis(), all_compilers + all_pgis): for cuda, mpi, compiler in product(actual_cudas(), actual_mpis(), chain(actual_compilers(), actual_pgis())):
if "openmpi" in mpi and valid_cuda(cuda, compiler) and valid_mpi(compiler, mpi): if "openmpi" in mpi and valid_cuda(cuda, compiler) and valid_mpi(compiler, mpi):
for of in actual_openmpi_flavors(): for of in actual_openmpi_flavors():
enable(cuda + "_aware_" + mpi + "_" + compiler + "_" + of) enable(cuda + "_aware_" + mpi + "_" + compiler + "_" + of)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment