From 7f74a0879f05ac9afd1b1b0e480532f4b42e0777 Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Wed, 9 Jun 2021 13:36:54 -0400 Subject: [PATCH] Update format comment, add note about endian support --- source/adios2/engine/bp5/BP5Engine.h | 14 ++++++++------ .../adios2/toolkit/format/bp5/BP5Deserializer.cpp | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/source/adios2/engine/bp5/BP5Engine.h b/source/adios2/engine/bp5/BP5Engine.h index 4b1e090d28..8d6ae80da0 100644 --- a/source/adios2/engine/bp5/BP5Engine.h +++ b/source/adios2/engine/bp5/BP5Engine.h @@ -129,12 +129,14 @@ class BP5Engine *number of different "formats" written by any rank. * * - * MetaData file (md.0) contains encoded metadata for each timestep, for each - *rank BP5 header for "Metadata" (64 bytes) for each timestep: uint64_t - *TotalSize of this metadata block (including this length) uint64_t[WriterCount] - *Length of each writer rank's metadata for each rank FFS-encoded metadata block - *of length corresponding to entry above - * + * MetaData file (md.0) contains encoded metadata/attribute data + * BP5 header for "Metadata" (64 bytes) + * for each timestep: + * uint64_t : TotalSize of this metadata block + * uint64_t[WriterCount] : Length of each rank's metadata + * uint64_t[WriterCount] : Length of each rank's attribute + * FFS-encoded metadata block of the length above + * FFS-encoded attribute data block of the length above * * Data file (data.x) contains a block of data for each timestep, for each *rank diff --git a/source/adios2/toolkit/format/bp5/BP5Deserializer.cpp b/source/adios2/toolkit/format/bp5/BP5Deserializer.cpp index 68230efe42..b66b18089e 100644 --- a/source/adios2/toolkit/format/bp5/BP5Deserializer.cpp +++ b/source/adios2/toolkit/format/bp5/BP5Deserializer.cpp @@ -798,6 +798,20 @@ static int FindOffsetCM(size_t Dims, const size_t *Size, const size_t *Index) * - InData is the input, a slab of the global array * - OutData is the output, to be filled with the selection array. */ + +/* + * ******************************* + * + * ExtractSelectionFromPartial*M both need to be extended to work when + * the reader and writer have different byte orders. This involves at + * least supporting simple big/little-endian byte reversal, but a true + * archival format should also consider mixed and middle-endian + * hybrids. This would require changes to the BP5 header so that the + * appropriate transformations could be determined. + * + * ******************************* + */ + // Row major version void BP5Deserializer::ExtractSelectionFromPartialRM( int ElementSize, size_t Dims, const size_t *GlobalDims,