Skip to content

Commit

Permalink
bug fix for issue LLNL#808
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Wang <[email protected]>
  • Loading branch information
wangvsa committed Jul 1, 2024
1 parent ee836d6 commit 186fcec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/src/testutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -1260,12 +1260,17 @@ int test_remove_file(test_cfg* cfg, const char* filepath)

/* stat file and simply return if it already doesn't exist */
rc = stat(filepath, &sb);
// We want every rank get the result from stat()
// above. The barrier makes sure rank 0 won't just
// go ahead delete the file before others call stat()
test_barrier(cfg);
if (rc) {
test_print_verbose_once(cfg,
"DEBUG: stat(%s): file already doesn't exist", filepath);
return 0;
}


if (cfg->use_mpiio) {
if (cfg->rank == 0 || cfg->io_pattern == IO_PATTERN_NN) {
MPI_CHECK(cfg, (MPI_File_delete(filepath, MPI_INFO_NULL)));
Expand Down

0 comments on commit 186fcec

Please sign in to comment.