Skip to content

Commit

Permalink
Merge pull request #2765 from JasonRuonanWang/table
Browse files Browse the repository at this point in the history
Table engine: added error message for compressor parameter
  • Loading branch information
JasonRuonanWang authored Jun 14, 2021
2 parents 1ef854f + 56514a9 commit 97ff73b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions source/adios2/engine/table/TableWriter.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,18 @@ void TableWriter::PutDeferredCommon(Variable<T> &variable, const T *data)
var->m_Type == helper::GetDataType<std::complex<float>>() ||
var->m_Type == helper::GetDataType<std::complex<double>>())
{
m_Compressor = new compress::CompressZFP({});
var->AddOperation(*m_Compressor,
{{ops::zfp::key::accuracy, m_UseAccuracy}});
if (m_UseAccuracy.empty())
{
std::cerr << "Parameter accuracy for lossy compression is "
"not specified, compressor not added"
<< std::endl;
}
else
{
m_Compressor = new compress::CompressZFP({});
var->AddOperation(*m_Compressor, {{ops::zfp::key::accuracy,
m_UseAccuracy}});
}
}
#else
std::cerr << "ADIOS2 is not compiled with ZFP "
Expand Down

0 comments on commit 97ff73b

Please sign in to comment.