Skip to content

Commit

Permalink
Throw error when unsupported parameters are used with the CUDA backend
Browse files Browse the repository at this point in the history
Co-authored-by: Norbert Podhorszki <[email protected]>
  • Loading branch information
anagainaru and pnorbert committed Mar 29, 2023
1 parent 6b3e1dd commit e3f2588
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 e3f2588

Please sign in to comment.