From e2e5cc272eb3a98df8218ec72fade00b1990379a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Andr=C3=A9=20Reuter?= Date: Mon, 10 Nov 2025 18:08:57 +0100 Subject: [PATCH 1/2] add LLVM toolchain support to Score-P easyblock --- easybuild/easyblocks/s/score_p.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easybuild/easyblocks/s/score_p.py b/easybuild/easyblocks/s/score_p.py index 3948df03eb8..d6094b38db6 100644 --- a/easybuild/easyblocks/s/score_p.py +++ b/easybuild/easyblocks/s/score_p.py @@ -92,6 +92,7 @@ def configure_step(self, *args, **kwargs): toolchain.INTELCOMP: 'intel', toolchain.NVHPC: 'nvhpc', toolchain.PGI: 'pgi', + toolchain.LLVM: 'clang', } nvhpc_since = { 'Score-P': '8.0', @@ -115,6 +116,9 @@ def configure_step(self, *args, **kwargs): else: raise EasyBuildError("Compiler family %s not supported yet (only: %s)", comp_fam, ', '.join(comp_opts.keys())) + # Enable LLVM instrumentation plugin instead of compiler instrumentation for Score-P v9.0+ + if comp_fam == toolchain.LLVM and LooseVersion(self.version) >= LooseVersion('9.0'): + self.cfg.update('configopts', "--enable-llvm-plugin") # --with-mpi=(bullxmpi|cray|hp|ibmpoe|intel|intel2|intel3|intelpoe|lam| # mpibull2|mpich|mpich2|mpich3|mpich4|openmpi|openmpi3| \ From 13b8abfb2c3fb7ee5b999ce9a56e355a983c0355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Andr=C3=A9=20Reuter?= Date: Tue, 11 Nov 2025 10:15:46 +0100 Subject: [PATCH 2/2] Only apply changes based on LooseVersion and software name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit EasyBlock is also used for e.g. OTF2, Cube and Scalasca, which may not require the changes done to Score-P. Signed-off-by: Jan André Reuter --- easybuild/easyblocks/s/score_p.py | 35 +++++++++++++++++-------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/easybuild/easyblocks/s/score_p.py b/easybuild/easyblocks/s/score_p.py index d6094b38db6..f7b1c1585db 100644 --- a/easybuild/easyblocks/s/score_p.py +++ b/easybuild/easyblocks/s/score_p.py @@ -49,23 +49,25 @@ class EB_Score_minus_P(ConfigureMake): Support for building and installing software using the Score-P configuration style (e.g., Cube, OTF2, Scalasca, and Score-P). """ + def configure_step(self, *args, **kwargs): """Configure the build, set configure options for compiler, MPI and dependencies.""" - if LooseVersion('8.0') <= LooseVersion(self.version) < LooseVersion('8.5'): - # Fix an issue where the configure script would fail if certain dependencies are installed in a path - # that includes "yes" or "no", see https://gitlab.com/score-p/scorep/-/issues/1008. - yes_no_regex = [ - (r'\*yes\*\|\*no\*', 'yes,*|no,*|*,yes|*,no'), - (r'_lib}\${with_', '_lib},${with_'), - ] - configure_scripts = [ - os.path.join(self.start_dir, 'build-backend', 'configure'), - os.path.join(self.start_dir, 'build-mpi', 'configure'), - os.path.join(self.start_dir, 'build-shmem', 'configure'), - ] - for configure_script in configure_scripts: - apply_regex_substitutions(configure_script, yes_no_regex) + if self.name == "Score-P": + if LooseVersion('8.0') <= LooseVersion(self.version) < LooseVersion('8.5'): + # Fix an issue where the configure script would fail if certain dependencies are installed in a path + # that includes "yes" or "no", see https://gitlab.com/score-p/scorep/-/issues/1008. + yes_no_regex = [ + (r'\*yes\*\|\*no\*', 'yes,*|no,*|*,yes|*,no'), + (r'_lib}\${with_', '_lib},${with_'), + ] + configure_scripts = [ + os.path.join(self.start_dir, 'build-backend', 'configure'), + os.path.join(self.start_dir, 'build-mpi', 'configure'), + os.path.join(self.start_dir, 'build-shmem', 'configure'), + ] + for configure_script in configure_scripts: + apply_regex_substitutions(configure_script, yes_no_regex) # Remove some settings from the environment, as they interfere with # Score-P's configure magic... @@ -117,8 +119,9 @@ def configure_step(self, *args, **kwargs): raise EasyBuildError("Compiler family %s not supported yet (only: %s)", comp_fam, ', '.join(comp_opts.keys())) # Enable LLVM instrumentation plugin instead of compiler instrumentation for Score-P v9.0+ - if comp_fam == toolchain.LLVM and LooseVersion(self.version) >= LooseVersion('9.0'): - self.cfg.update('configopts', "--enable-llvm-plugin") + if comp_fam == toolchain.LLVM: + if self.name == "Score-P" and LooseVersion(self.version) >= LooseVersion('9.0'): + self.cfg.update('configopts', "--enable-llvm-plugin") # --with-mpi=(bullxmpi|cray|hp|ibmpoe|intel|intel2|intel3|intelpoe|lam| # mpibull2|mpich|mpich2|mpich3|mpich4|openmpi|openmpi3| \