From 67bf00ce5f4b36766ee68ad5212c1dfd63177f2e Mon Sep 17 00:00:00 2001 From: Ian Lumsden Date: Tue, 15 Oct 2024 12:30:05 -0700 Subject: [PATCH] Adds variant to toggle use of rdpmc due to icl-utk-edu/papi#238 --- var/spack/repos/builtin/packages/papi/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index b1c869f7bada03..37aa44a101511e 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -59,6 +59,7 @@ 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 +160,9 @@ def configure_args(self): 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")