Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Score-P easyblock to use --with-nocross-compiler-suite=nvhpc for recent software versions + unset $CPPFLAGS, $LDFLAGS, $LIB which may interfere with configure magic #2928

Merged
merged 4 commits into from
Sep 3, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions easybuild/easyblocks/s/score_p.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@
@author: Bernd Mohr (Juelich Supercomputing Centre)
@author: Markus Geimer (Juelich Supercomputing Centre)
@author: Alexander Grund (TU Dresden)
@author: Christian Feld (Juelich Supercomputing Centre)
"""
import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools import LooseVersion
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.environment import unset_env_vars
from easybuild.tools.modules import get_software_root, get_software_libdir


Expand All @@ -45,6 +48,10 @@ class EB_Score_minus_P(ConfigureMake):

def configure_step(self, *args, **kwargs):
"""Configure the build, set configure options for compiler, MPI and dependencies."""
# Remove some settings from the environment, as they interfere with
# Score-P's configure magic...
unset_env_vars(['CPPFLAGS', 'LDFLAGS', 'LIBS'])

# On non-cross-compile platforms, specify compiler and MPI suite explicitly. This is much quicker and safer
# than autodetection. In Score-P build-system terms, the following platforms are considered cross-compile
# architectures:
Expand All @@ -56,16 +63,27 @@ def configure_step(self, *args, **kwargs):
# Of those, only Cray is supported right now.
tc_fam = self.toolchain.toolchain_family()
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 = {
# assume that system toolchain uses a system-provided GCC
toolchain.SYSTEM: 'gcc',
toolchain.GCC: 'gcc',
toolchain.IBMCOMP: 'ibm',
toolchain.INTELCOMP: 'intel',
toolchain.NVHPC: 'pgi',
toolchain.NVHPC: 'nvhpc',
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()
if comp_fam in comp_opts:
self.cfg.update('configopts', "--with-nocross-compiler-suite=%s" % comp_opts[comp_fam])
Expand Down