Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operator for BigWhoop compression #4398

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ option(BUILD_TESTING "Build testing" OFF)
include(CTest)
mark_as_advanced(CLEAR BUILD_TESTING)

adios_option(BigWhoop "Enable support for BigWhoop transforms" AUTO)
adios_option(Blosc2 "Enable support for c-blosc-2 transforms" AUTO)
adios_option(BZip2 "Enable support for BZip2 transforms" AUTO)
adios_option(ZFP "Enable support for ZFP transforms" AUTO)
Expand Down Expand Up @@ -263,7 +264,7 @@ endif()


set(ADIOS2_CONFIG_OPTS
DataMan DataSpaces HDF5 HDF5_VOL MHS SST Fortran MPI Python PIP Blosc2 BZip2
DataMan DataSpaces HDF5 HDF5_VOL MHS SST Fortran MPI Python PIP BigWhoop Blosc2 BZip2
LIBPRESSIO MGARD MGARD_MDR PNG SZ ZFP DAOS IME O_DIRECT Sodium Catalyst SysVShMem UCX
ZeroMQ Profiling Endian_Reverse Derived_Variable AWSSDK XRootD GPU_Support CUDA Kokkos
Kokkos_CUDA Kokkos_HIP Kokkos_SYCL Campaign KVCACHE
Expand Down
10 changes: 10 additions & 0 deletions cmake/DetectOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ endfunction()
# Multithreading
find_package(Threads REQUIRED)

# BigWhoop
if(ADIOS2_USE_BigWhoop STREQUAL AUTO)
find_package(BWC CONFIG)
elseif(ADIOS2_USE_BigWhoop)
find_package(BWC REQUIRED CONFIG)
endif()
if(BWC_FOUND)
set(ADIOS2_HAVE_BigWhoop TRUE)
endif()

# Blosc2
if(ADIOS2_USE_Blosc2 STREQUAL AUTO)
find_package(Blosc2 2.10.1 QUIET)
Expand Down
5 changes: 5 additions & 0 deletions cmake/adios2-config-common.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ if(NOT @BUILD_SHARED_LIBS@)
find_dependency(Blosc2 2.10.1)
endif()

set(ADIOS2_HAVE_BigWhoop @ADIOS2_HAVE_BigWhoop@)
if(ADIOS2_HAVE_BigWhoop)
find_dependency(BigWhoop)
endif()

set(ADIOS2_HAVE_BZip2 @ADIOS2_HAVE_BZip2@)
if(ADIOS2_HAVE_BZip2)
find_dependency(BZip2)
Expand Down
5 changes: 5 additions & 0 deletions source/adios2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ if(ADIOS2_HAVE_DataSpaces)
target_link_libraries(adios2_core_mpi PRIVATE DataSpaces::DataSpaces)
endif()

if(ADIOS2_HAVE_BigWhoop)
target_sources(adios2_core PRIVATE operator/compress/CompressBigWhoop.cpp)
target_link_libraries(adios2_core PRIVATE bwc::bwclib)
endif()

set(maybe_adios2_blosc2)
if(ADIOS2_HAVE_Blosc2)
target_sources(adios2_core PRIVATE operator/compress/CompressBlosc.cpp)
Expand Down
12 changes: 12 additions & 0 deletions source/adios2/common/ADIOSTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,18 @@ std::ostream &operator<<(std::ostream &os, const T &value);
namespace ops
{

// BWC PARAMETERS
#ifdef ADIOS2_HAVE_BIGWHOOP
constexpr char LossyBWC[] = "bigwhoop";
namespace bigwhoop
{
namespace key
{
constexpr char rate[] = "rate";
}
}
#endif

// SZ PARAMETERS
#ifdef ADIOS2_HAVE_SZ

Expand Down
3 changes: 3 additions & 0 deletions source/adios2/core/Info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ void adios2_available_engines(size_t *nentries, const char *const **list)
}

static const char *const operators[] = {
#ifdef ADIOS2_HAVE_BIGWHOOP
"BigWhoop",
#endif
#ifdef ADIOS2_HAVE_BZIP2
"BZip2",
#endif
Expand Down
1 change: 1 addition & 0 deletions source/adios2/core/Operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Operator
COMPRESS_SZ = 6,
COMPRESS_ZFP = 7,
COMPRESS_MGARDPLUS = 8,
COMPRESS_BIGWHOOP = 9,
REFACTOR_MDR = 41,
CALLBACK_SIGNATURE1 = 51,
CALLBACK_SIGNATURE2 = 52,
Expand Down
14 changes: 13 additions & 1 deletion source/adios2/operator/OperatorFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
#include "adios2/operator/plugin/PluginOperator.h"
#include <numeric>

#ifdef ADIOS2_HAVE_BIGWHOOP
#include "adios2/operator/compress/CompressBigWhoop.h"
#endif

#ifdef ADIOS2_HAVE_BLOSC2
#include "adios2/operator/compress/CompressBlosc.h"
#endif
Expand Down Expand Up @@ -60,6 +64,8 @@ std::string OperatorTypeToString(const Operator::OperatorType type)
{
switch (type)
{
case Operator::COMPRESS_BIGWHOOP:
return "bigwhoop";
case Operator::COMPRESS_BLOSC:
return "blosc";
case Operator::COMPRESS_BZIP2:
Expand Down Expand Up @@ -93,7 +99,13 @@ std::shared_ptr<Operator> MakeOperator(const std::string &type, const Params &pa

const std::string typeLowerCase = helper::LowerCase(type);

if (typeLowerCase == "blosc")
if (typeLowerCase == "bigwhoop")
{
#ifdef ADIOS2_HAVE_BIGWHOOP
ret = std::make_shared<compress::CompressBigWhoop>(parameters);
#endif
}
else if (typeLowerCase == "blosc")
{
#ifdef ADIOS2_HAVE_BLOSC2
ret = std::make_shared<compress::CompressBlosc>(parameters);
Expand Down
Loading