Skip to content

Commit

Permalink
Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
eisenhauer committed Feb 7, 2023
1 parent 7b585c0 commit 4bc57f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
11 changes: 3 additions & 8 deletions testing/adios2/engine/staging-common/TestReadJoined.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,9 @@ TEST_F(CommonReadTest, ADIOS2CommonRead1D8)
// form a mpiSize * Nx 1D array
int mpiRank = 0, mpiSize = 1;

int TimeGapDetected = 0;
#if ADIOS2_USE_MPI
MPI_Comm_rank(testComm, &mpiRank);
MPI_Comm_size(testComm, &mpiSize);
const int nblocks = (mpiRank < static_cast<int>(nblocksPerProcess.size())
? nblocksPerProcess[mpiRank]
: 1);
#else
const int nblocks = nblocksPerProcess[0];
#endif

// Write test data using ADIOS2
Expand All @@ -70,7 +64,8 @@ TEST_F(CommonReadTest, ADIOS2CommonRead1D8)

if (!mpiRank)
{
std::cout << "Reading as stream with BeginStep/EndStep:" << std::endl;
std::cout << "Reading as stream with BeginStep/EndStep on " << mpiSize
<< "processes :" << std::endl;
}

int step = 0;
Expand Down Expand Up @@ -106,7 +101,7 @@ TEST_F(CommonReadTest, ADIOS2CommonRead1D8)
std::vector<double> data(Nrows * Ncols);
reader.Get(var, data.data());
reader.PerformGets();
for (size_t i = 0; i < Nrows; ++i)
for (size_t i = 0; i < (size_t)Nrows; ++i)
{
for (size_t j = 0; j < Ncols; ++j)
{
Expand Down
1 change: 1 addition & 0 deletions testing/adios2/engine/staging-common/TestWriteJoined.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ TEST_F(CommonWriteTest, ADIOS2CommonWrite)
#endif
adios2::IO outIO = adios.DeclareIO("Output");

EXPECT_LE(mpiSize, nblocksPerProcess.size());
outIO.SetEngine(engine);
outIO.SetParameters(engineParams);

Expand Down

0 comments on commit 4bc57f4

Please sign in to comment.