Skip to content

Commit

Permalink
ZFP: request a param if not serial
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentebolea committed Oct 26, 2021
1 parent d96a4fd commit d39e521
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/adios2/operator/compress/CompressZFP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ zfp_stream *CompressZFP::GetZFPStream(const Dims &dimensions, DataType type,
{
zfp_stream *stream = zfp_stream_open(NULL);
zfp_stream_set_execution(stream, ZFP_DEFAULT_EXECUTION_POLICY);
bool isSerial = ZFP_DEFAULT_EXECUTION_POLICY == zfp_exec_serial;

auto itAccuracy = parameters.find("accuracy");
const bool hasAccuracy = itAccuracy != parameters.end();
Expand Down Expand Up @@ -291,13 +292,15 @@ zfp_stream *CompressZFP::GetZFPStream(const Dims &dimensions, DataType type,
else if (backend == "serial")
{
policy = zfp_exec_serial;
isSerial = true;
}

zfp_stream_set_execution(stream, policy);
}

if ((hasAccuracy && hasPrecision) || (hasAccuracy && hasRate) ||
(hasPrecision && hasRate))
(hasPrecision && hasRate) ||
(!hasAccuracy && !hasRate && !hasPrecision && !isSerial))
{
std::ostringstream oss;
oss << std::endl
Expand Down

0 comments on commit d39e521

Please sign in to comment.