summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorEric Brugger <brugger1@llnl.gov>2022-08-05 09:25:56 -0700
committerGitHub <noreply@github.com>2022-08-05 10:25:56 -0600
commitfefab26f01640c476d21ab444db46647f6edc121 (patch)
treed61e77f9dbaf3560c0b11b37832d21097c3557d8 /var
parente30a8e70cea8b47a5ebc33d99ac7b87c345b48f6 (diff)
downloadspack-fefab26f01640c476d21ab444db46647f6edc121.tar.gz
spack-fefab26f01640c476d21ab444db46647f6edc121.tar.bz2
spack-fefab26f01640c476d21ab444db46647f6edc121.tar.xz
spack-fefab26f01640c476d21ab444db46647f6edc121.zip
Add vtkm variant to visit spack package. (#31887)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/visit/cmake-findvtkh-3.3.patch31
-rw-r--r--var/spack/repos/builtin/packages/visit/package.py14
-rw-r--r--var/spack/repos/builtin/packages/visit/vtk-m_transport_tag_topology_field_in.patch12
3 files changed, 57 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/visit/cmake-findvtkh-3.3.patch b/var/spack/repos/builtin/packages/visit/cmake-findvtkh-3.3.patch
new file mode 100644
index 0000000000..f1e45f0334
--- /dev/null
+++ b/var/spack/repos/builtin/packages/visit/cmake-findvtkh-3.3.patch
@@ -0,0 +1,31 @@
+--- a/src/CMake/FindVTKh.cmake 2022-07-21 15:39:17.991222000 -0700
++++ b/src/CMake/FindVTKh.cmake 2022-07-21 15:42:12.326207000 -0700
+@@ -15,6 +15,10 @@
+ # Kathleen Biagas, Tue Jan 21 10:46:31 PST 2020
+ # Set VTKm_INCLUDE_DIRS.
+ #
++# Eric Brugger, Thu 21 Jul 2022 06:39:36 PM EDT
++# Modified the logic to handle the case where a RELWITHDEBINFO build of
++# VTKh was created. Modified the logic not to install static libraries.
++#
+ #****************************************************************************/
+
+ IF (DEFINED VISIT_VTKH_DIR)
+@@ -47,13 +51,16 @@
+ # all interface link dependencies
+ function(get_lib_loc_and_install _lib)
+ get_target_property(ttype ${_lib} TYPE)
+- if (ttype STREQUAL "INTERFACE_LIBRARY")
++ if (ttype STREQUAL "INTERFACE_LIBRARY" OR ttype STREQUAL "STATIC_LIBRARY")
+ return()
+ endif()
+ get_target_property(i_loc ${_lib} IMPORTED_LOCATION)
+ if (NOT i_loc)
+ get_target_property(i_loc ${_lib} IMPORTED_LOCATION_RELEASE)
+ endif()
++ if (NOT i_loc)
++ get_target_property(i_loc ${_lib} IMPORTED_LOCATION_RELWITHDEBINFO)
++ endif()
+ if(i_loc)
+ THIRD_PARTY_INSTALL_LIBRARY(${i_loc})
+ endif()
diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py
index 18bb289ec5..dc7ce3c564 100644
--- a/var/spack/repos/builtin/packages/visit/package.py
+++ b/var/spack/repos/builtin/packages/visit/package.py
@@ -78,12 +78,14 @@ class Visit(CMakePackage):
variant("silo", default=True, description="Enable Silo file format")
variant("python", default=True, description="Enable Python support")
variant("mpi", default=True, description="Enable parallel engine")
+ variant("vtkm", default=False, description="Enable VTK-m support")
patch("spack-changes-3.1.patch", when="@3.1.0:3.2.2")
patch("spack-changes-3.0.1.patch", when="@3.0.1")
patch("nonframework-qwt.patch", when="^qt~framework platform=darwin")
patch("parallel-hdf5.patch", when="@3.0.1:3.2.2+hdf5+mpi")
patch("parallel-hdf5-3.3.patch", when="@3.3.0:+hdf5+mpi")
+ patch("cmake-findvtkh-3.3.patch", when="@3.3.0:+vtkm")
# Fix pthread and librt link errors
patch("visit32-missing-link-libs.patch", when="@3.2")
@@ -145,6 +147,14 @@ class Visit(CMakePackage):
depends_on("adios2+python", when="+adios2+python")
depends_on("adios2~python", when="+adios2~python")
+ # vtk-m also requires vtk-h. Disabling cuda since that requires
+ # later versions of vtk-m and vtk-h. The patch prevents vtk-m from
+ # throwing an exception whenever any vtk-m operations are performed.
+ depends_on("vtk-m@1.7.0+testlib~cuda", when="+vtkm")
+ depends_on("vtk-h@0.8.1+shared~mpi~openmp~cuda", when="+vtkm")
+
+ depends_on("vtk-m", patches=[patch("vtk-m_transport_tag_topology_field_in.patch")])
+
depends_on("zlib")
@when("@3:,develop")
@@ -268,6 +278,10 @@ class Visit(CMakePackage):
else:
args.append(self.define("VISIT_PARALLEL", False))
+ if "+vtkm" in spec:
+ args.append(self.define("VISIT_VTKM_DIR", spec["vtk-m"].prefix))
+ args.append(self.define("VISIT_VTKH_DIR", spec["vtk-h"].prefix))
+
return args
# https://spack.readthedocs.io/en/latest/packaging_guide.html?highlight=executables#making-a-package-discoverable-with-spack-external-find
diff --git a/var/spack/repos/builtin/packages/visit/vtk-m_transport_tag_topology_field_in.patch b/var/spack/repos/builtin/packages/visit/vtk-m_transport_tag_topology_field_in.patch
new file mode 100644
index 0000000000..2428411589
--- /dev/null
+++ b/var/spack/repos/builtin/packages/visit/vtk-m_transport_tag_topology_field_in.patch
@@ -0,0 +1,12 @@
+--- a/vtkm/cont/arg/TransportTagTopologyFieldIn.h 2022-07-18 19:02:03.153633000 -0400
++++ b/vtkm/cont/arg/TransportTagTopologyFieldIn.h 2022-07-18 19:02:51.538743000 -0400
+@@ -90,7 +90,9 @@
+ {
+ if (object.GetNumberOfValues() != detail::TopologyDomainSize(inputDomain, TopologyElementTag()))
+ {
++#if 0
+ throw vtkm::cont::ErrorBadValue("Input array to worklet invocation the wrong size.");
++#endif
+ }
+
+ return object.PrepareForInput(Device(), token);