Skip to content
Snippets Groups Projects
Commit 96fba212 authored by Damian Alvarez's avatar Damian Alvarez
Browse files

To make it match upstream

parent 86ad38a6
Branches
Tags
No related merge requests found
......@@ -37,7 +37,6 @@ from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.config import build_option
from easybuild.tools.filetools import apply_regex_substitutions
from easybuild.tools.modules import get_software_root
from easybuild.tools.systemtools import get_cpu_features, get_shared_lib_ext
from easybuild.tools.toolchain.compiler import OPTARCH_GENERIC
from easybuild.tools.utilities import nub
......@@ -54,7 +53,7 @@ class EB_ELPA(ConfigureMake):
"""Custom easyconfig parameters for ELPA."""
extra_vars = {
'auto_detect_cpu_features': [True, "Auto-detect available CPU features, and configure accordingly", CUSTOM],
'cuda': [True, "Enable CUDA build if CUDA is among the dependencies", CUSTOM],
'cuda': [None, "Enable CUDA build if CUDA is among the dependencies", CUSTOM],
'with_shared': [True, "Enable building of shared ELPA libraries", CUSTOM],
'with_single': [True, "Enable building of single precision ELPA functions", CUSTOM],
'with_generic_kernel': [True, "Enable building of ELPA generic kernels", CUSTOM],
......@@ -110,7 +109,6 @@ class EB_ELPA(ConfigureMake):
self.log.info("Enabling use of %s (should be supported based on CPU features)", flag.upper())
setattr(self, flag, True)
def run_all_steps(self, *args, **kwargs):
"""
Put configure options in place for different builds (with and without openmp).
......@@ -164,7 +162,8 @@ class EB_ELPA(ConfigureMake):
self.cfg.update('configopts', 'LIBS="$LIBLAPACK"')
# Add CUDA features
if 'CUDA' in [i['name'] for i in self.cfg.dependencies()]:
cuda_is_dep = 'CUDA' in [i['name'] for i in self.cfg.dependencies()]
if cuda_is_dep and (self.cfg['cuda'] is None or self.cfg['cuda']):
self.cfg.update('configopts', '--enable-nvidia-gpu')
cuda_cc_space_sep = self.cfg.template_values['cuda_cc_space_sep'].replace('.', '').split()
# Just one is supported, so pick the highest one (but prioritize sm_80)
......@@ -172,10 +171,13 @@ class EB_ELPA(ConfigureMake):
for cc in cuda_cc_space_sep:
if int(cc) > int(selected_cc) and int(selected_cc) != 80:
selected_cc = cc
self.cfg.update('configopts', f'--with-NVIDIA-GPU-compute-capability=sm_{selected_cc}')
self.cfg.update('configopts', '--with-NVIDIA-GPU-compute-capability=sm_%s' % selected_cc)
if selected_cc == "80":
self.cfg.update('configopts', '--enable-nvidia-sm80-gpu')
elif not self.cfg['cuda']:
self.log.warning("CUDA is disabled")
elif not cuda_is_dep and self.cfg['cuda']:
raise EasyBuildError("CUDA is not a dependency, but support for CUDA is enabled.")
# make all builds verbose
self.cfg.update('buildopts', 'V=1')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment