Skip to content

Commit

Permalink
Merge pull request #3567 from anagainaru/zfp-cuda-backend
Browse files Browse the repository at this point in the history
Throw an error when unsupported parameters are used with the ZFP CUDA backend
  • Loading branch information
vicentebolea authored Mar 29, 2023
2 parents 6b3e1dd + 17c3f83 commit 7328fb3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions source/adios2/operator/compress/CompressZFP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,21 @@ zfp_stream *GetZFPStream(const Dims &dimensions, DataType type,
zfp_stream_set_execution(stream, ZFP_DEFAULT_EXECUTION_POLICY);
isSerial = ZFP_DEFAULT_EXECUTION_POLICY == zfp_exec_serial;

#ifdef ADIOS2_HAVE_ZFP_CUDA
if (hasAccuracy)
{
helper::Throw<std::runtime_error>(
"Operator", "CompressZFP", "GetZfpField",
"The CUDA backend in ZFP cannot use the 'accuracy' parameter");
}
if (hasPrecision)
{
helper::Throw<std::runtime_error>(
"Operator", "CompressZFP", "GetZfpField",
"The CUDA backend in ZFP cannot use the 'precisiom' parameter");
}
#endif

if (hasBackend)
{
auto policy = ZFP_DEFAULT_EXECUTION_POLICY;
Expand Down

0 comments on commit 7328fb3

Please sign in to comment.