Skip to content

Commit f8da68a

Browse files
authored
Merge pull request #3987 from Thyre/20251110180857_new_pr_score_p
add LLVM toolchain support to Score-P easyblock
2 parents bd00942 + 13b8abf commit f8da68a

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

easybuild/easyblocks/s/score_p.py

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,25 @@ class EB_Score_minus_P(ConfigureMake):
4949
Support for building and installing software using the Score-P configuration style (e.g., Cube, OTF2, Scalasca,
5050
and Score-P).
5151
"""
52+
5253
def configure_step(self, *args, **kwargs):
5354
"""Configure the build, set configure options for compiler, MPI and dependencies."""
5455

55-
if LooseVersion('8.0') <= LooseVersion(self.version) < LooseVersion('8.5'):
56-
# Fix an issue where the configure script would fail if certain dependencies are installed in a path
57-
# that includes "yes" or "no", see https://gitlab.com/score-p/scorep/-/issues/1008.
58-
yes_no_regex = [
59-
(r'\*yes\*\|\*no\*', 'yes,*|no,*|*,yes|*,no'),
60-
(r'_lib}\${with_', '_lib},${with_'),
61-
]
62-
configure_scripts = [
63-
os.path.join(self.start_dir, 'build-backend', 'configure'),
64-
os.path.join(self.start_dir, 'build-mpi', 'configure'),
65-
os.path.join(self.start_dir, 'build-shmem', 'configure'),
66-
]
67-
for configure_script in configure_scripts:
68-
apply_regex_substitutions(configure_script, yes_no_regex)
56+
if self.name == "Score-P":
57+
if LooseVersion('8.0') <= LooseVersion(self.version) < LooseVersion('8.5'):
58+
# Fix an issue where the configure script would fail if certain dependencies are installed in a path
59+
# that includes "yes" or "no", see https://gitlab.com/score-p/scorep/-/issues/1008.
60+
yes_no_regex = [
61+
(r'\*yes\*\|\*no\*', 'yes,*|no,*|*,yes|*,no'),
62+
(r'_lib}\${with_', '_lib},${with_'),
63+
]
64+
configure_scripts = [
65+
os.path.join(self.start_dir, 'build-backend', 'configure'),
66+
os.path.join(self.start_dir, 'build-mpi', 'configure'),
67+
os.path.join(self.start_dir, 'build-shmem', 'configure'),
68+
]
69+
for configure_script in configure_scripts:
70+
apply_regex_substitutions(configure_script, yes_no_regex)
6971

7072
# Remove some settings from the environment, as they interfere with
7173
# Score-P's configure magic...
@@ -92,6 +94,7 @@ def configure_step(self, *args, **kwargs):
9294
toolchain.INTELCOMP: 'intel',
9395
toolchain.NVHPC: 'nvhpc',
9496
toolchain.PGI: 'pgi',
97+
toolchain.LLVM: 'clang',
9598
}
9699
nvhpc_since = {
97100
'Score-P': '8.0',
@@ -115,6 +118,10 @@ def configure_step(self, *args, **kwargs):
115118
else:
116119
raise EasyBuildError("Compiler family %s not supported yet (only: %s)",
117120
comp_fam, ', '.join(comp_opts.keys()))
121+
# Enable LLVM instrumentation plugin instead of compiler instrumentation for Score-P v9.0+
122+
if comp_fam == toolchain.LLVM:
123+
if self.name == "Score-P" and LooseVersion(self.version) >= LooseVersion('9.0'):
124+
self.cfg.update('configopts', "--enable-llvm-plugin")
118125

119126
# --with-mpi=(bullxmpi|cray|hp|ibmpoe|intel|intel2|intel3|intelpoe|lam|
120127
# mpibull2|mpich|mpich2|mpich3|mpich4|openmpi|openmpi3| \

0 commit comments

Comments
 (0)