Skip to content

Commit

Permalink
spack: variant for hwloc support (#2419)
Browse files Browse the repository at this point in the history
  • Loading branch information
boeschf authored Oct 8, 2024
1 parent 6524ce7 commit bca8a5a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spack/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class Arbor(CMakePackage, CudaPackage):
default=False,
description="Enable vectorization of computational kernels",
)
variant("hwloc", default=False, description="support for thread pinning via HWLOC")
variant(
"gpu_rng",
default=False,
Expand Down Expand Up @@ -107,6 +108,9 @@ class Arbor(CMakePackage, CudaPackage):
depends_on("mpi", when="+mpi")
depends_on("py-mpi4py", when="+mpi+python", type=("build", "run"))

# hwloc
depends_on("hwloc@2:", when="+hwloc", type=("build", "run"))

# python (bindings)
with when("+python"):
extends("python")
Expand Down Expand Up @@ -135,6 +139,7 @@ def cmake_args(self):
self.define_from_variant("ARB_WITH_MPI", "mpi"),
self.define_from_variant("ARB_WITH_PYTHON", "python"),
self.define_from_variant("ARB_VECTORIZE", "vectorize"),
self.define_from_variant("ARB_USE_HWLOC", "hwloc"),
]

if "+cuda" in self.spec:
Expand Down

0 comments on commit bca8a5a

Please sign in to comment.