summaryrefslogtreecommitdiffstats
path: root/testpar/t_mpi.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2001-05-10 13:40:07 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2001-05-10 13:40:07 (GMT)
commit3214f19350c4564e78e4bd7eec79bb2ccda7b024 (patch)
treedf0b79266afadbc1ae579db1a7e0527216522433 /testpar/t_mpi.c
parentb563af455f683e4aa5bcfc11e0b37b5bdb34a1b6 (diff)
downloadhdf5-3214f19350c4564e78e4bd7eec79bb2ccda7b024.zip
hdf5-3214f19350c4564e78e4bd7eec79bb2ccda7b024.tar.gz
hdf5-3214f19350c4564e78e4bd7eec79bb2ccda7b024.tar.bz2
[svn-r3901] Purpose:
Bug fix Description: added a barrier to prevent racing condition before remove file and open file. Platforms tested: modi4,pp cVS: ----------------------------------------------------------------------
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), "");