From 56514a9e27bb098f1ff4eb43136f82c72774d048 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Mon, 14 Jun 2021 14:15:57 -0400 Subject: [PATCH] added error message for compressor parameter --- source/adios2/engine/table/TableWriter.tcc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source/adios2/engine/table/TableWriter.tcc b/source/adios2/engine/table/TableWriter.tcc index e429b4c057..1c6d1d4ab5 100644 --- a/source/adios2/engine/table/TableWriter.tcc +++ b/source/adios2/engine/table/TableWriter.tcc @@ -104,9 +104,18 @@ void TableWriter::PutDeferredCommon(Variable &variable, const T *data) var->m_Type == helper::GetDataType>() || var->m_Type == helper::GetDataType>()) { - 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 "