From 1aa77e695d653fec30a6b6b50c09fffd481b59b2 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Thu, 4 Apr 2024 11:00:53 -0600 Subject: Trilinos: add threadsafe variant (#43480) * Fixes #43454 by exposing a threadsafe variant * [@spackbot] updating style on behalf of Chrismarsh * fix style --------- Co-authored-by: Chrismarsh --- var/spack/repos/builtin/packages/trilinos/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index faaee0970e..3b0ede995b 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -103,6 +103,13 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): variant("uvm", default=False, when="@13.2: +cuda", description="Turn on UVM for CUDA build") variant("wrapper", default=False, description="Use nvcc-wrapper for CUDA build") + # Makes the Teuchos Memory Management classes (Teuchos::RCP, Teuchos::Ptr, Teuchos::Array, + # Teuchos::ArrayView, and Teuchos::ArrayRCP) thread-safe. Requires at least the OMP kokkos + # backend to be enabled. Without, this seemingly does nothing + variant( + "threadsafe", default=False, when="+openmp", description="Enable threadsafe in Teuchos" + ) + # TPLs (alphabet order) variant("adios2", default=False, description="Enable ADIOS2") variant("boost", default=False, description="Compile with Boost") @@ -633,6 +640,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): define_trilinos_enable( "EXPLICIT_INSTANTIATION", "explicit_template_instantiation" ), + define_from_variant("Trilinos_ENABLE_THREAD_SAFE", "threadsafe"), ] ) -- cgit v1.2.3-70-g09d2