vtkm_config.mk needs update
Instead of Ascent's curated list of vtkm flags, we would like to pick everything up from vtkm_config.mk
for folks building with makefiles.
Here is an example of a the currently generated vtkm_config.mk
:
VTKm_VERSION = 1.9
VTKm_DIR = /uberenv_libs/spack/opt/spack/linux-ubuntu18.04-zen/gcc-7.5.0/vtk-m-1.9.0-7y6pmmpiilfwkcrjxbjnwsreofsxd3t5
VTKm_BUILD_SHARED_LIBS = OFF
VTKm_ENABLE_CUDA = OFF
VTKm_ENABLE_KOKKOS = OFF
VTKm_ENABLE_OPENMP = ON
VTKm_ENABLE_TBB = OFF
VTKm_ENABLE_LOGGING = OFF
VTKm_ENABLE_RENDERING = ON
VTKm_ENABLE_GL_CONTEXT =
VTKm_ENABLE_OSMESA_CONTEXT =
VTKm_ENABLE_EGL_CONTEXT =
VTKm_ENABLE_MPI = OFF
VTKm_INCLUDE_FLAGS = -I $(VTKm_DIR)/include
VTKm_LIB_FLAGS = -L $(VTKm_DIR)/lib \
-lvtkm_rendering-$(VTKM_VERSION) \
-lvtkm_filter_contour-$(VTKM_VERSION) \
-lvtkm_filter_gradient-$(VTKM_VERSION) \
-lvtkm_filter_extra-$(VTKM_VERSION) \
-lvtkm_filter_common-$(VTKM_VERSION) \
-lvtkm_worklet-$(VTKM_VERSION) \
-lvtkm_source-$(VTKM_VERSION) \
-lvtkm_io-$(VTKM_VERSION) \
-lvtkm_cont-$(VTKM_VERSION) \
-lvtkmdiympi_nompi
This is missing several libs and I think has a typo (VTKM_VERSION
used instead of VTKm_VERSION
for the lib names)
For reference, here is the set of curated linking commands we use in Ascent:
(This lib order works for us, but it may not reflect the best/implied-by-cmake linking order.)
######
# libs for vtk-m 1.9
######
VTKH_VTKM_LIB_FLAGS = -L $(ASCENT_VTKM_DIR)/lib \
-lvtkm_rendering-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_clean_grid-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_flow-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_contour-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_connected_components-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_density_estimate-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_entity_extraction-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_field_conversion-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_field_transform-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_geometry_refinement-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_resampling-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_image_processing-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_mesh_info-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_scalar_topology-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_vector_analysis-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_multi_block-$(ASCENT_VTKM_VERSION) \
-lvtkm_filter_core-$(ASCENT_VTKM_VERSION) \
-lvtkm_worklet-$(ASCENT_VTKM_VERSION) \
-lvtkm_source-$(ASCENT_VTKM_VERSION) \
-lvtkm_io-$(ASCENT_VTKM_VERSION) \
-lvtkm_cont-$(ASCENT_VTKM_VERSION)
# add proper diy based on mpi
ifeq ($(VTKm_ENABLE_MPI),ON)
VTKH_VTKM_LIB_FLAGS += -lvtkmdiympi
else
VTKH_VTKM_LIB_FLAGS += -lvtkmdiympi_nompi
endif
We have tests in Ascent's CI that exercise an external makefile build against an install. These tests catch any changes needed to support the makefile case. It would be great if vtk-m also had a similar in-spirit test for vtkm_config.mk upstream.