Skip to content

Commit

Permalink
Merge pull request #817 from wangvsa/concurrency-bug-fix
Browse files Browse the repository at this point in the history
Concurrency bug fix for issue #808
  • Loading branch information
MichaelBrim authored Jul 22, 2024
2 parents 3ffd297 + 0f5765c commit c44d052
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 c44d052

Please sign in to comment.