Skip to content

Commit

Permalink
Excluding GPU buffers from bypassing the ADIOS internal buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
anagainaru committed Dec 16, 2022
1 parent 266044b commit df7a065
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions source/adios2/toolkit/format/bp5/BP5Deserializer.cpp
Expand Up @@ -2,7 +2,7 @@
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* BP5Serializer.h
* BP5Deserializer.h
*
*/

Expand Down Expand Up @@ -1357,10 +1357,12 @@ BP5Deserializer::GenerateReadRequests(const bool doAllocTempBuffers,
RR.WriterRank = WriterRank;
RR.StartOffset =
writer_meta_base->DataBlockLocation[NeededBlock];

RR.DirectToAppMemory = IsContiguousTransfer(
Req, &writer_meta_base->Offsets[StartDim],
&writer_meta_base->Count[StartDim]);
if (Req->MemSpace != MemorySpace::Host)
RR.DirectToAppMemory = false;
else
RR.DirectToAppMemory = IsContiguousTransfer(
Req, &writer_meta_base->Offsets[StartDim],
&writer_meta_base->Count[StartDim]);
RR.ReadLength =
helper::GetDataTypeSize(Req->VarRec->Type) *
CalcBlockLength(Req->VarRec->DimCount,
Expand Down Expand Up @@ -1490,9 +1492,12 @@ BP5Deserializer::GenerateReadRequests(const bool doAllocTempBuffers,
StartOffsetInBlock;
RR.ReadLength =
EndOffsetInBlock - StartOffsetInBlock;
RR.DirectToAppMemory = IsContiguousTransfer(
Req, &writer_meta_base->Offsets[StartDim],
&writer_meta_base->Count[StartDim]);
if (Req->MemSpace != MemorySpace::Host)
RR.DirectToAppMemory = false;
else
RR.DirectToAppMemory = IsContiguousTransfer(
Req, &writer_meta_base->Offsets[StartDim],
&writer_meta_base->Count[StartDim]);
if (RR.DirectToAppMemory)
{
/*
Expand Down

0 comments on commit df7a065

Please sign in to comment.