Skip to content
Snippets Groups Projects
Commit e3757bcc authored by Christian Feld's avatar Christian Feld
Browse files

Use --with-nocross-compiler-suite=nvhpc if package is recent enough

parent ccd9ee74
No related branches found
No related tags found
No related merge requests found
...@@ -30,11 +30,13 @@ implemented as an easyblock. ...@@ -30,11 +30,13 @@ implemented as an easyblock.
@author: Bernd Mohr (Juelich Supercomputing Centre) @author: Bernd Mohr (Juelich Supercomputing Centre)
@author: Markus Geimer (Juelich Supercomputing Centre) @author: Markus Geimer (Juelich Supercomputing Centre)
@author: Alexander Grund (TU Dresden) @author: Alexander Grund (TU Dresden)
@author: Christian Feld (Juelich Supercomputing Centre)
""" """
import easybuild.tools.toolchain as toolchain import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.configuremake import ConfigureMake from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools.build_log import EasyBuildError from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.modules import get_software_root, get_software_libdir from easybuild.tools.modules import get_software_root, get_software_libdir
from distutils.version import LooseVersion
class EB_Score_minus_P(ConfigureMake): class EB_Score_minus_P(ConfigureMake):
...@@ -56,16 +58,27 @@ class EB_Score_minus_P(ConfigureMake): ...@@ -56,16 +58,27 @@ class EB_Score_minus_P(ConfigureMake):
# Of those, only Cray is supported right now. # Of those, only Cray is supported right now.
tc_fam = self.toolchain.toolchain_family() tc_fam = self.toolchain.toolchain_family()
if tc_fam != toolchain.CRAYPE: if tc_fam != toolchain.CRAYPE:
# --with-nocross-compiler-suite=(gcc|ibm|intel|pgi|studio) # since 2022/12 releases: --with-nocross-compiler-suite=(gcc|ibm|intel|oneapi|nvhpc|pgi|clang|aocc|amdclang)
comp_opts = { comp_opts = {
# assume that system toolchain uses a system-provided GCC # assume that system toolchain uses a system-provided GCC
toolchain.SYSTEM: 'gcc', toolchain.SYSTEM: 'gcc',
toolchain.GCC: 'gcc', toolchain.GCC: 'gcc',
toolchain.IBMCOMP: 'ibm', toolchain.IBMCOMP: 'ibm',
toolchain.INTELCOMP: 'intel', toolchain.INTELCOMP: 'intel',
toolchain.NVHPC: 'pgi', toolchain.NVHPC: 'nvhpc',
toolchain.PGI: 'pgi', toolchain.PGI: 'pgi',
} }
nvhpc_since = {
'Score-P': '8.0',
'Scalasca': '2.6.1',
'OTF2': '3.0.2',
'CubeW': '4.8',
'CubeLib': '4.8',
'CubeGUI': '4.8',
}
if LooseVersion(self.version) < LooseVersion(nvhpc_since.get(self.name, '0')):
comp_opts[toolchain.NVHPC] = 'pgi'
comp_fam = self.toolchain.comp_family() comp_fam = self.toolchain.comp_family()
if comp_fam in comp_opts: if comp_fam in comp_opts:
self.cfg.update('configopts', "--with-nocross-compiler-suite=%s" % comp_opts[comp_fam]) self.cfg.update('configopts', "--with-nocross-compiler-suite=%s" % comp_opts[comp_fam])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment