Skip to content

Commit

Permalink
Ensure processes always synchronize in t_shapesame test setup (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF authored Feb 3, 2021
1 parent eac0599 commit c55ac8a
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions testpar/t_shapesame.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,11 +441,8 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
VRFY((ret >= 0), "H5Dwrite() small_dataset initial write succeeded");

/* sync with the other processes before checking data */
if (!use_collective_io) {

mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc == MPI_SUCCESS), "Sync after small dataset writes");
}
mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc == MPI_SUCCESS), "Sync after small dataset writes");

/* read the small data set back to verify that it contains the
* expected data. Note that each process reads in the entire
Expand Down Expand Up @@ -515,11 +512,8 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
VRFY((ret >= 0), "H5Dwrite() large_dataset initial write succeeded");

/* sync with the other processes before checking data */
if (!use_collective_io) {

mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc == MPI_SUCCESS), "Sync after large dataset writes");
}
mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc == MPI_SUCCESS), "Sync after large dataset writes");

/* read the large data set back to verify that it contains the
* expected data. Note that each process reads in the entire
Expand Down Expand Up @@ -547,12 +541,8 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker
VRFY((mis_match == FALSE), "large ds init data good.");

/* sync with the other processes before changing data */

if (!use_collective_io) {

mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc == MPI_SUCCESS), "Sync initial values check");
}
mrc = MPI_Barrier(MPI_COMM_WORLD);
VRFY((mrc == MPI_SUCCESS), "Sync initial values check");

return;

Expand Down

0 comments on commit c55ac8a

Please sign in to comment.