From 58e6e4c420417ccfa7397c2c63657ec9ebdcb936 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 5 Mar 2025 09:41:40 -0800 Subject: [PATCH] openPMD: no BP5 Group Based Disallow BP5 with group based encoding, because it creates files that cannot be read back efficiently. What works: BP4 f, BP4 g, BP4 v (still experimental), BP5 f, BP5 v (still experimental), H5 f, H5 g. --- Source/Diagnostics/FlushFormats/FlushFormatOpenPMD.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Diagnostics/FlushFormats/FlushFormatOpenPMD.cpp b/Source/Diagnostics/FlushFormats/FlushFormatOpenPMD.cpp index aeb26656b46..ae54fd13e5a 100644 --- a/Source/Diagnostics/FlushFormats/FlushFormatOpenPMD.cpp +++ b/Source/Diagnostics/FlushFormats/FlushFormatOpenPMD.cpp @@ -46,6 +46,13 @@ FlushFormatOpenPMD::FlushFormatOpenPMD (const std::string& diag_name) encoding = openPMD::IterationEncoding::fileBased; } + // BP5 does not support groupBased (metadata explosion) + if ((openpmd_backend == "bp5" || openpmd_backend == "bp") && + (encoding == openPMD::IterationEncoding::groupBased)) + { + throw std::runtime_error("BeamMonitor: groupBased encoding not supported for BP5."); + } + std::string diag_type_str; pp_diag_name.get("diag_type", diag_type_str); if (diag_type_str == "BackTransformed")