Skip to content

Commit

Permalink
Fix bug in reader side derived vars
Browse files Browse the repository at this point in the history
  • Loading branch information
eisenhauer committed Nov 6, 2024
1 parent 2128f05 commit 1e40261
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/adios2/toolkit/format/bp5/BP5Deserializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1741,11 +1741,14 @@ BP5Deserializer::GenerateReadRequests(const bool doAllocTempBuffers, size_t *max
RR.Timestep = Step;
RR.WriterRank = WriterRank;
RR.StartOffset =
writer_meta_base_input->DataBlockLocation[0];
writer_meta_base_input->DataBlockLocation[Block];
// read whole block
size_t InputStartDim = Block * writer_meta_base_input->Dims;
RR.ReadLength =
helper::GetDataTypeSize(VarPrimaryRec->Type) *
CalcBlockLength(VarPrimaryRec->DimCount,
varBase->m_Count.data());
CalcBlockLength(
writer_meta_base_input->Dims,
&writer_meta_base_input->Count[InputStartDim]);
RR.DestinationAddr = (char *)malloc(RR.ReadLength);
RR.DirectToAppMemory = false;
RR.ReqIndex = ReqIndex;
Expand Down

0 comments on commit 1e40261

Please sign in to comment.