Skip to content

Commit

Permalink
Adds variant to toggle use of rdpmc due to icl-utk-edu/papi#238 (spac…
Browse files Browse the repository at this point in the history
  • Loading branch information
ilumsden authored Oct 17, 2024
1 parent 2da812c commit 9ba7af4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions var/spack/repos/builtin/packages/papi/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -159,6 +165,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")

Expand Down

0 comments on commit 9ba7af4

Please sign in to comment.