From acdcc8ed711c62e9736857b3d47ee05cfa90f66e Mon Sep 17 00:00:00 2001 From: John Biddiscombe Date: Mon, 3 Jul 2023 09:33:56 +0200 Subject: Add support to Paraview for TBB (#38582) Co-authored-by: Jean Favre --- var/spack/repos/builtin/packages/paraview/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 619d7a9ec0..b5c5cf7ca4 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -71,6 +71,7 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): variant("kits", default=True, description="Use module kits") variant("pagosa", default=False, description="Build the pagosa adaptor") variant("eyedomelighting", default=False, description="Enable Eye Dome Lighting feature") + variant("tbb", default=False, description="Enable multi-threaded parallelism with TBB") variant("adios2", default=False, description="Enable ADIOS2 support", when="@5.8:") variant("visitbridge", default=False, description="Enable VisItBridge support") variant("raytracing", default=False, description="Enable Raytracing support") @@ -174,6 +175,8 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): depends_on("openpmd-api +adios2", when="+openpmd +adios2", type=("build", "run")) depends_on("openpmd-api +hdf5", when="+openpmd +hdf5", type=("build", "run")) + depends_on("tbb", when="+tbb") + depends_on("mpi", when="+mpi") depends_on("qt+opengl", when="@5.3.0:+qt+opengl2") depends_on("qt~opengl", when="@5.3.0:+qt~opengl2") @@ -601,6 +604,9 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): if "+eyedomelighting" in spec: cmake_args.append("-DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting:BOOL=ON") + if "+tbb" in spec: + cmake_args.append("-DVTK_SMP_IMPLEMENTATION_TYPE=TBB") + # Hide git from Paraview so it will not use `git describe` # to find its own version number if spec.satisfies("@5.4.0:5.4.1"): -- cgit v1.2.3-60-g2f50