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

CarpetX: only use BLOSC2 if compiled into ADIOS2 #314

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CarpetX/src/io_adios2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ void carpetx_adios2_t::OutputADIOS2(const cGH *const cctkGH,
// io.SetEngine("BP5");
engine = io.Open(filename, adios2::Mode::Write);

#ifdef ADIOS2_HAVE_BLOSC2
const adios2::Operator compressor =
adios.DefineOperator("Blosc2Compressor", adios2::ops::LosslessBlosc);
// Use a high compression rate and a byteshuffle filter
Expand All @@ -261,6 +262,7 @@ void carpetx_adios2_t::OutputADIOS2(const cGH *const cctkGH,
{adios2::ops::blosc::key::doshuffle,
adios2::ops::blosc::value::doshuffle_shuffle},
};
#endif

if (io_verbose)
CCTK_VINFO(" Defining variables...");
Expand Down Expand Up @@ -313,7 +315,9 @@ void carpetx_adios2_t::OutputADIOS2(const cGH *const cctkGH,
adios2::Variable<CCTK_REAL> var =
io.DefineVariable<CCTK_REAL>(varname, {}, {},
{1, 1, 1});
#ifdef ADIOS2_HAVE_BLOSC2
var.AddOperation(compressor, compressor_options);
#endif
} // for local_component

} else { // if combine_components
Expand Down