mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
Minor fixes for distributed contour tree example
This commit is contained in:
parent
255d977bc3
commit
124c58eb48
@ -152,6 +152,11 @@ if (VTKm_ENABLE_HDF5_IO)
|
||||
find_package(HDF5 REQUIRED COMPONENTS HL)
|
||||
endif()
|
||||
|
||||
# If the linked HDF5 is parallel, we need to add the MPI include directory
|
||||
# for its dependencies
|
||||
vtkm_option(VTKm_HDF5_IS_PARALLEL "HDF5 library is parallel" OFF)
|
||||
mark_as_advanced(VTKm_HDF5_IS_PARALLEL)
|
||||
|
||||
# VTK-m will turn on logging by default, but will set the default
|
||||
# logging level to WARN. This option should not be visible by default
|
||||
# in the GUI, as ERROR and WARN level logging should not interfere
|
||||
|
@ -64,7 +64,6 @@ if (VTKm_ENABLE_MPI AND TARGET vtkm::filter_scalar_topology AND TARGET vtkm::io)
|
||||
vtkm_add_target_information(ContourTree_Distributed
|
||||
MODIFY_CUDA_FLAGS
|
||||
DEVICE_SOURCES ContourTreeApp.cxx)
|
||||
target_compile_definitions(ContourTree_Distributed PRIVATE "WITH_MPI")
|
||||
|
||||
option (VTKM_EXAMPLE_CONTOURTREE_ENABLE_DEBUG_PRINT Off)
|
||||
mark_as_advanced(VTKM_EXAMPLE_CONTOURTREE_ENABLE_DEBUG_PRINT)
|
||||
@ -77,18 +76,22 @@ if (VTKm_ENABLE_MPI AND TARGET vtkm::filter_scalar_topology AND TARGET vtkm::io)
|
||||
target_compile_definitions(ContourTree_Distributed PRIVATE "ENABLE_SET_NUM_THREADS")
|
||||
endif()
|
||||
if (VTKm_ENABLE_HDF5_IO)
|
||||
if(VTKm_HDF5_IS_PARALLEL)
|
||||
target_compile_definitions(ContourTree_Distributed PRIVATE "ENABLE_HDFIO")
|
||||
target_include_directories(ContourTree_Distributed PRIVATE ${HDF5_INCLUDE_DIR})
|
||||
target_link_libraries(ContourTree_Distributed ${HDF5_LIBRARIES})
|
||||
else()
|
||||
message(FATAL_ERROR "Compiling distributed contour tree example with HDF5 support requires using a parallel HDF5 library and enabling VTKm_HDF5_IS_PARALLEL")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
add_executable(TreeCompiler TreeCompilerApp.cxx)
|
||||
target_link_libraries(TreeCompiler vtkm::filter_core)
|
||||
vtkm_add_target_information(TreeCompiler DROP_UNUSED_SYMBOLS)
|
||||
vtkm_add_target_information(TreeCompiler DROP_UNUSED_SYMBOLS MODIFY_CUDA_FLAGS DEVICE_SOURCES TreeCompilerApp.cxx)
|
||||
|
||||
add_executable(BranchCompiler BranchCompilerApp.cxx)
|
||||
target_link_libraries(BranchCompiler vtkm::filter_scalar_topology)
|
||||
vtkm_add_target_information(BranchCompiler DROP_UNUSED_SYMBOLS)
|
||||
vtkm_add_target_information(BranchCompiler DROP_UNUSED_SYMBOLS MODIFY_CUDA_FLAGS DEVICE_SOURCES BranchCompilerApp.cxx)
|
||||
|
||||
configure_file(split_data_2d.py split_data_2d.py COPYONLY)
|
||||
configure_file(split_data_3d.py split_data_3d.py COPYONLY)
|
||||
|
@ -99,7 +99,7 @@ VTKM_THIRDPARTY_POST_INCLUDE
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using ValueType = vtkm::Float32;
|
||||
using ValueType = vtkm::Float64;
|
||||
|
||||
#define SINGLE_FILE_STDOUT_STDERR
|
||||
|
||||
|
@ -88,6 +88,9 @@ vtkm_library(
|
||||
if (VTKm_ENABLE_HDF5_IO)
|
||||
target_include_directories(vtkm_io PRIVATE $<BUILD_INTERFACE:${HDF5_INCLUDE_DIR}>)
|
||||
target_link_libraries(vtkm_io PRIVATE ${HDF5_HL_LIBRARIES} ${HDF5_LIBRARIES})
|
||||
if (VTKm_HDF5_IS_PARALLEL)
|
||||
target_link_libraries(vtkm_io PRIVATE MPI::MPI_CXX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(internal)
|
||||
|
Loading…
Reference in New Issue
Block a user