Skip to content

Commit

Permalink
Merge pull request #3073 from eisenhauer/BP5NdCopy
Browse files Browse the repository at this point in the history
Use NdCopy for array filling in BP5
  • Loading branch information
eisenhauer authored Feb 25, 2022
2 parents 7cebd20 + e780c85 commit a4a5c6b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
29 changes: 17 additions & 12 deletions source/adios2/toolkit/format/bp5/BP5Deserializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1230,20 +1230,25 @@ void BP5Deserializer::FinalizeGets(std::vector<ReadRequest> Requests)
GlobalDimensions[i] = RankSize[i];
}
}
if (m_ReaderIsRowMajor)
{
ExtractSelectionFromPartialRM(
ElementSize, DimCount, GlobalDimensions, RankOffset,
RankSize, SelOffset, SelSize, IncomingData,
(char *)Req.Data, Req.MemSpace);
}
else

auto inStart =
adios2::Dims(RankOffset, RankOffset + DimCount);
auto inCount = adios2::Dims(RankSize, RankSize + DimCount);
auto outStart =
adios2::Dims(SelOffset, SelOffset + DimCount);
auto outCount = adios2::Dims(SelSize, SelSize + DimCount);

if (!m_ReaderIsRowMajor)
{
ExtractSelectionFromPartialCM(
ElementSize, DimCount, GlobalDimensions, RankOffset,
RankSize, SelOffset, SelSize, IncomingData,
(char *)Req.Data, Req.MemSpace);
std::reverse(inStart.begin(), inStart.end());
std::reverse(inCount.begin(), inCount.end());
std::reverse(outStart.begin(), outStart.end());
std::reverse(outCount.begin(), outCount.end());
}

helper::NdCopy(IncomingData, inStart, inCount, true, true,
(char *)Req.Data, outStart, outCount, true,
true, ElementSize);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions testing/adios2/engine/bp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ bp_gtest_add_tests_helper(StepsFileGlobalArray MPI_ALLOW)
bp_gtest_add_tests_helper(StepsFileLocalArray MPI_ALLOW)
bp_gtest_add_tests_helper(SelectSteps MPI_ALLOW)

bp3_bp4_gtest_add_tests_helper(SelectionsOnRowMajorData MPI_NONE)
bp3_bp4_gtest_add_tests_helper(SelectionsOnColumnMajorData MPI_NONE)
bp_gtest_add_tests_helper(SelectionsOnRowMajorData MPI_NONE)
bp_gtest_add_tests_helper(SelectionsOnColumnMajorData MPI_NONE)

if(NOT MSVC)
bp_gtest_add_tests_helper(BufferSize MPI_NONE)
Expand Down

0 comments on commit a4a5c6b

Please sign in to comment.