diff --git a/CMakeLists.txt b/CMakeLists.txt index 876318ceded59fd94879c50b75bc4c32ce161a9e..3d8b020a9d93feb44ab93b30a92e9d68c19b4008 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,6 +71,7 @@ if(ADIOS_USE_MPI) add_definitions(-DOMPI_SKIP_MPICXX) endif() option(ADIOS_USE_BZip2 "Enable support for BZip2 transforms" OFF) +option(ADIOS_USE_ZFP "Enable support for ZFP transforms" OFF) option(ADIOS_USE_ADIOS1 "Enable support for the ADIOS 1 engine" OFF) option(ADIOS_USE_HDF5 "Enable support for the HDF5 engine" OFF) @@ -79,7 +80,7 @@ option(ADIOS_USE_HDF5 "Enable support for the HDF5 engine" OFF) set(ADIOS_USE_DataMan ${SHARED_LIBS_SUPPORTED}) include(GenerateADIOSConfig) -GenerateADIOSConfig(MPI BZip2 ADIOS1 HDF5 DataMan) +GenerateADIOSConfig(MPI ZFP BZip2 ADIOS1 HDF5 DataMan) install( FILES ${ADIOS_BINARY_DIR}/adios2/ADIOSConfig.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/adios2 @@ -123,7 +124,7 @@ message("") message("ADIOS2 build configuration:") message(" ADIOS Version: ${ADIOS_VERSION}") message(" C++ Compiler : ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} ${CMAKE_CXX_COMPILER_WRAPPER}") -message(" ${CMAKE_CXX_COMPILER}") +message(" ${CMAKE_CXX_COMPILER}") message("") message(" Installation prefix: ${CMAKE_INSTALL_PREFIX}") message(" Features:") @@ -136,6 +137,7 @@ message(" Build Type: ${CMAKE_BUILD_TYPE}") message(" Testing: ${BUILD_TESTING}") message(" MPI: ${ADIOS_USE_MPI}") message(" BZip2: ${ADIOS_USE_BZip2}") +message(" ZFP: ${ADIOS_USE_ZFP}") message(" ADIOS1: ${ADIOS_USE_ADIOS1}") message(" DataMan: ${ADIOS_USE_DataMan}") message(" HDF5: ${ADIOS_USE_HDF5}") diff --git a/cmake/FindZFP.cmake b/cmake/FindZFP.cmake new file mode 100644 index 0000000000000000000000000000000000000000..b2b3f94c0d5ee1a992a03191da3741f62d95decd --- /dev/null +++ b/cmake/FindZFP.cmake @@ -0,0 +1,59 @@ +#------------------------------------------------------------------------------# +# Distributed under the OSI-approved Apache License, Version 2.0. See +# accompanying file Copyright.txt for details. +#------------------------------------------------------------------------------# +# +# FindZFP +# ----------- +# +# Try to find the zfp library +# +# This module defines the following variables: +# +# ZFP_FOUND - System has zfp +# ZFP_INCLUDE_DIRS - The zfp include directory +# ZFP_LIBRARIES - Link these to use zfp +# +# and the following imported targets: +# zfp::zfp - The zfp compression library target +# +# You can also set the following variable to help guide the search: +# ZFP_ROOT_DIR - The install prefix for zfp containing the +# include and lib folders +# Note: this can be set as a CMake variable or an +# environment variable. If specified as a CMake +# variable, it will override any setting specified +# as an environment variable. + +if(NOT ZFP_FOUND) + if((NOT ZFP_ROOT_DIR) AND (NOT (ENV{ZFP_ROOT_DIR} STREQUAL ""))) + set(ZFP_ROOT_DIR "$ENV{ZFP_ROOT_DIR}") + endif() + if(ZFP_ROOT_DIR) + set(ZFP_INCLUDE_OPTS HINTS ${ZFP_ROOT_DIR}/include NO_DEFAULT_PATHS) + set(ZFP_LIBRARY_OPTS + HINTS ${ZFP_ROOT_DIR}/lib ${ZFP_ROOT_DIR}/lib64 + NO_DEFAULT_PATHS + ) + endif() + + find_path(ZFP_INCLUDE_DIR zfp.h ${ZFP_INCLUDE_OPTS}) + find_library(ZFP_LIBRARY zfp ${ZFP_LIBRARY_OPTS}) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(ZFP + FOUND_VAR ZFP_FOUND + REQUIRED_VARS ZFP_LIBRARY ZFP_INCLUDE_DIR + ) + if(ZFP_FOUND) + set(ZFP_INCLUDE_DIRS ${ZFP_INCLUDE_DIR}) + set(ZFP_LIBRARIES ${ZFP_LIBRARY}) + if(ZFP_FOUND AND NOT TARGET zfp::zfp) + add_library(zfp::zfp UNKNOWN IMPORTED) + set_target_properties(zfp::zfp PROPERTIES + IMPORTED_LOCATION "${ZFP_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${ZFP_INCLUDE_DIR}" + ) + endif() + endif() +endif() diff --git a/cmake/FindZeroMQ.cmake b/cmake/FindZeroMQ.cmake new file mode 100644 index 0000000000000000000000000000000000000000..fc3a4a702d39a46bf457b84adda2c1c7e9bc9664 --- /dev/null +++ b/cmake/FindZeroMQ.cmake @@ -0,0 +1,59 @@ +#------------------------------------------------------------------------------# +# Distributed under the OSI-approved Apache License, Version 2.0. See +# accompanying file Copyright.txt for details. +#------------------------------------------------------------------------------# +# +# FindZeroMQ +# ----------- +# +# Try to find the ZeroMQ library +# +# This module defines the following variables: +# +# ZeroMQ_FOUND - System has ZMQ +# ZeroMQ_INCLUDE_DIRS - The ZMQ include directory +# ZeroMQ_LIBRARIES - Link these to use ZMQ +# +# and the following imported targets: +# ZeroMQ::ZMQ - The core ZMQ library +# +# You can also set the following variable to help guide the search: +# ZeroMQ_ROOT_DIR - The install prefix for ZeroMQ containing the +# include and lib folders +# Note: this can be set as a CMake variable or an +# environment variable. If specified as a CMake +# variable, it will override any setting specified +# as an environment variable. + +if(NOT ZeroMQ_FOUND) + if((NOT ZeroMQ_ROOT_DIR) AND (NOT (ENV{ZeroMQ_ROOT_DIR} STREQUAL ""))) + set(ZeroMQ_ROOT_DIR "$ENV{ZeroMQ_ROOT_DIR}") + endif() + if(ZeroMQ_ROOT_DIR) + set(ZeroMQ_INCLUDE_OPTS HINTS ${ZeroMQ_ROOT_DIR}/include NO_DEFAULT_PATHS) + set(ZeroMQ_LIBRARY_OPTS + HINTS ${ZeroMQ_ROOT_DIR}/lib ${ZeroMQ_ROOT_DIR}/lib64 + NO_DEFAULT_PATHS + ) + endif() + + find_path(ZeroMQ_INCLUDE_DIR zmq.h ${ZeroMQ_INCLUDE_OPTS}) + find_library(ZeroMQ_LIBRARY zmq ${ZeroMQ_LIBRARY_OPTS}) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(ZeroMQ + FOUND_VAR ZeroMQ_FOUND + REQUIRED_VARS ZeroMQ_LIBRARY ZeroMQ_INCLUDE_DIR + ) + if(ZeroMQ_FOUND) + set(ZeroMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR}) + set(ZeroMQ_LIBRARIES ${ZeroMQ_LIBRARY}) + if(ZeroMQ_FOUND AND NOT TARGET ZeroMQ::ZMQ) + add_library(ZeroMQ::ZMQ UNKNOWN IMPORTED) + set_target_properties(ZeroMQ::ZMQ PROPERTIES + IMPORTED_LOCATION "${ZeroMQ_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${ZeroMQ_INCLUDE_DIR}" + ) + endif() + endif() +endif() diff --git a/source/adios2/CMakeLists.txt b/source/adios2/CMakeLists.txt index 7ed5b2ea36bfc73999aecc5e52cdfff188da5313..c715327044f02e41f3a53347551564f30c5fa2a8 100644 --- a/source/adios2/CMakeLists.txt +++ b/source/adios2/CMakeLists.txt @@ -57,6 +57,13 @@ if(ADIOS_USE_BZip2) target_link_libraries(adios2 PRIVATE BZip2::BZip2) endif() +if(ADIOS_USE_ZFP) + find_package(ZFP REQUIRED) + message("ADIOS ZFP support not yet implemented") +# target_sources(adios2 PRIVATE transform/ZFP.cpp) +# target_link_libraries(adios2 PRIVATE zfp::zfp) +endif() + if(ADIOS_USE_MPI) find_package(MPI COMPONENTS C REQUIRED) target_include_directories(adios2 PUBLIC ${MPI_C_INCLUDE_PATH}) diff --git a/source/dataman/CMakeLists.txt b/source/dataman/CMakeLists.txt index af6ced04c2d4461e5b378fa3e6063ef65478575c..a35ae5b88e13541b1afb93433cfc7b3a5bc95560 100644 --- a/source/dataman/CMakeLists.txt +++ b/source/dataman/CMakeLists.txt @@ -21,6 +21,31 @@ add_library(cacheman MODULE CacheMan.h CacheMan.cpp) target_link_libraries(cacheman PRIVATE dataman) list(APPEND dataman_targets cacheman) +option(ADIOS_USE_DataMan_ZeroMQ "Enable ZeroMQ for DataMan" OFF) +if(ADIOS_USE_DataMan_ZeroMQ) + find_package(ZeroMQ REQUIRED) + message(STATUS "DataMan ZeroMQ support not yet implemented") + +# add_library(zmqman MODULE ZmqMan.h ZmqMan.cpp) +# target_link_libraries(zmqman PRIVATE dataman ZeroMQ::ZMQ) +# +# list(APPEND dataman_targets zmqman) +endif() + +# Make this a standalone option if you want to seperately enable/disable +# DataMan ZFP support from ADIOS ZFP support. +set(ADIOS_USE_DataMan_ZFP ${ADIOS_USE_ZFP}) + +if(ADIOS_USE_DataMan_ZFP) + find_package(ZFP REQUIRED) + message(STATUS "DataMan ZFP support not yet implemented") + +# add_library(zfpman MODULE ZfpMan.h ZfpMan.cpp) +# target_link_libraries(zfpman PRIVATE dataman zfp::zfp) +# +# list(APPEND dataman_targets zfpman) +endif() + install( TARGETS ${dataman_targets} EXPORT adios2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}