Add vtkm variant to visit spack package. (#31887)
This commit is contained in:
parent
e30a8e70ce
commit
fefab26f01
@ -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()
|
@ -78,12 +78,14 @@ class Visit(CMakePackage):
|
|||||||
variant("silo", default=True, description="Enable Silo file format")
|
variant("silo", default=True, description="Enable Silo file format")
|
||||||
variant("python", default=True, description="Enable Python support")
|
variant("python", default=True, description="Enable Python support")
|
||||||
variant("mpi", default=True, description="Enable parallel engine")
|
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.1.patch", when="@3.1.0:3.2.2")
|
||||||
patch("spack-changes-3.0.1.patch", when="@3.0.1")
|
patch("spack-changes-3.0.1.patch", when="@3.0.1")
|
||||||
patch("nonframework-qwt.patch", when="^qt~framework platform=darwin")
|
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.patch", when="@3.0.1:3.2.2+hdf5+mpi")
|
||||||
patch("parallel-hdf5-3.3.patch", when="@3.3.0:+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
|
# Fix pthread and librt link errors
|
||||||
patch("visit32-missing-link-libs.patch", when="@3.2")
|
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")
|
||||||
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")
|
depends_on("zlib")
|
||||||
|
|
||||||
@when("@3:,develop")
|
@when("@3:,develop")
|
||||||
@ -268,6 +278,10 @@ def cmake_args(self):
|
|||||||
else:
|
else:
|
||||||
args.append(self.define("VISIT_PARALLEL", False))
|
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
|
return args
|
||||||
|
|
||||||
# https://spack.readthedocs.io/en/latest/packaging_guide.html?highlight=executables#making-a-package-discoverable-with-spack-external-find
|
# https://spack.readthedocs.io/en/latest/packaging_guide.html?highlight=executables#making-a-package-discoverable-with-spack-external-find
|
||||||
|
@ -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);
|
Loading…
Reference in New Issue
Block a user