summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorIan Lumsden <lumsden.ian@gmail.com>2024-10-17 17:29:56 -0400
committerGitHub <noreply@github.com>2024-10-17 14:29:56 -0700
commit9ba7af404a14e84eec8f79567a6232c06a3c8d69 (patch)
tree074ea376f3820d78f338701307501132a28a5a6f /var
parent2da812cbad004e5167e82ca2740c1d3575ccf7be (diff)
downloadspack-9ba7af404a14e84eec8f79567a6232c06a3c8d69.tar.gz
spack-9ba7af404a14e84eec8f79567a6232c06a3c8d69.tar.bz2
spack-9ba7af404a14e84eec8f79567a6232c06a3c8d69.tar.xz
spack-9ba7af404a14e84eec8f79567a6232c06a3c8d69.zip
Adds variant to toggle use of rdpmc due to icl-utk-edu/papi#238 (#47023)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/papi/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py
index b1c869f7ba..7b22451ae2 100644
--- a/var/spack/repos/builtin/packages/papi/package.py
+++ b/var/spack/repos/builtin/packages/papi/package.py
@@ -59,6 +59,12 @@ class Papi(AutotoolsPackage, ROCmPackage):
variant("cuda", default=False, description="Enable CUDA support")
variant("nvml", default=False, description="Enable NVML support")
variant("rocm_smi", default=False, description="Enable ROCm SMI support")
+ variant(
+ "rdpmc",
+ default=True,
+ when="@6.0.0:",
+ description="Enable use of rdpmc for reading counters, when possible",
+ )
variant("shared", default=True, description="Build shared libraries")
# PAPI requires building static libraries, so there is no "static" variant
@@ -159,6 +165,9 @@ class Papi(AutotoolsPackage, ROCmPackage):
build_shared = "yes" if "+shared" in spec else "no"
options.append("--with-shared-lib=" + build_shared)
+ build_rdpmc_support = "yes" if "+rdpmc" in spec else "no"
+ options.append("--enable-perfevent-rdpmc=" + build_rdpmc_support)
+
if "+static_tools" in spec:
options.append("--with-static-tools")