summaryrefslogtreecommitdiffstats
path: root/testpar/t_mpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'testpar/t_mpi.c')
-rw-r--r--testpar/t_mpi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index 0ebaca0..dd94fcc 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -248,6 +248,8 @@ test_mpio_gb_file(char *filename)
/* open a new file. Remove it first in case it exists. */
if (MAINPROCESS)
remove(filename);
+ MPI_Barrier(MPI_COMM_WORLD); /* prevent racing condition */
+
mrc = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE|MPI_MODE_RDWR,
info, &fh);
VRFY((mrc==MPI_SUCCESS), "");