From fc5a40649ba3425ee95d7368639f21e3d7d2b051 Mon Sep 17 00:00:00 2001 From: Ana Gainaru Date: Thu, 18 Jul 2024 06:31:08 -0400 Subject: [PATCH] Derived variables of type StoreData should not record the expression string (#4247) (cherry picked from commit b6242e8584e59a5177c5736d1bcfc0cfb2f353bc) --- source/adios2/toolkit/format/bp5/BP5Serializer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/adios2/toolkit/format/bp5/BP5Serializer.cpp b/source/adios2/toolkit/format/bp5/BP5Serializer.cpp index 2030023d79..f7d82ee16d 100644 --- a/source/adios2/toolkit/format/bp5/BP5Serializer.cpp +++ b/source/adios2/toolkit/format/bp5/BP5Serializer.cpp @@ -591,7 +591,8 @@ BP5Serializer::BP5WriterRec BP5Serializer::CreateWriterRec(void *Variable, const // and Offsets matching _MetaArrayRec const char *ExprString = NULL; #ifdef ADIOS2_HAVE_DERIVED_VARIABLE - ExprString = VD ? VD->m_Expr.ExprString.c_str() : NULL; + if (VD && (VD->GetDerivedType() != DerivedVarType::StoreData)) + ExprString = VD->m_Expr.ExprString.c_str(); #endif char *LongName = BuildLongName(Name, VB->m_ShapeID, (int)Type, ElemSize, TextStructID, ExprString);