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 <Chrismarsh@users.noreply.github.com>
This commit is contained in:
Chris Marsh 2024-04-04 11:00:53 -06:00 committed by GitHub
parent 3a0efeecf1
commit 1aa77e695d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 @@ def define_enable(suffix, value=None):
define_trilinos_enable(
"EXPLICIT_INSTANTIATION", "explicit_template_instantiation"
),
define_from_variant("Trilinos_ENABLE_THREAD_SAFE", "threadsafe"),
]
)