Skip to content

Commit

Permalink
Merge pull request ornladios#4343 from anagainaru/gpuSpan
Browse files Browse the repository at this point in the history
Setting the memory space for Spans to Host
  • Loading branch information
anagainaru authored Sep 11, 2024
2 parents faa8a49 + 5a99c80 commit d975ac0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/adios2/toolkit/format/bp5/BP5Serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ void BP5Serializer::Marshal(void *Variable, const char *Name, const DataType Typ
else
{
MemorySpace MemSpace = VB->GetMemorySpace(Data);
MemorySpace spanMemSpace = MemSpace;
MetaArrayRec *MetaEntry = (MetaArrayRec *)((char *)(MetadataBuf) + Rec->MetaOffset);
size_t ElemCount = CalcSize(DimCount, Count);
size_t DataOffset = 0;
Expand Down Expand Up @@ -884,6 +885,7 @@ void BP5Serializer::Marshal(void *Variable, const char *Name, const DataType Typ
{
*Span = CurDataBuffer->Allocate(ElemCount * ElemSize, ElemSize);
DataOffset = m_PriorDataBufferSizeTotal + Span->globalPos;
spanMemSpace = MemorySpace::Host;
}

if (!AlreadyWritten)
Expand Down Expand Up @@ -919,7 +921,7 @@ void BP5Serializer::Marshal(void *Variable, const char *Name, const DataType Typ
}
else
{
lf_QueueSpanMinMax(*Span, ElemCount, (DataType)Rec->Type, MemSpace,
lf_QueueSpanMinMax(*Span, ElemCount, (DataType)Rec->Type, spanMemSpace,
Rec->MetaOffset, Rec->MinMaxOffset, 0 /*BlockNum*/);
}
}
Expand Down Expand Up @@ -963,7 +965,7 @@ void BP5Serializer::Marshal(void *Variable, const char *Name, const DataType Typ
}
else
{
lf_QueueSpanMinMax(*Span, ElemCount, (DataType)Rec->Type, MemSpace,
lf_QueueSpanMinMax(*Span, ElemCount, (DataType)Rec->Type, spanMemSpace,
Rec->MetaOffset, Rec->MinMaxOffset,
MetaEntry->BlockCount - 1 /*BlockNum*/);
}
Expand Down

0 comments on commit d975ac0

Please sign in to comment.