summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2001-05-10 13:40:03 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2001-05-10 13:40:03 (GMT)
commit988e4ce0bb1fbb4e1d72001d485658f4131f048f (patch)
treed001cff9681af149788de60a99a3fce443e74701 /testpar
parent0c46256e027ab4dca384ac9e766bc78bddde1e50 (diff)
downloadhdf5-988e4ce0bb1fbb4e1d72001d485658f4131f048f.zip
hdf5-988e4ce0bb1fbb4e1d72001d485658f4131f048f.tar.gz
hdf5-988e4ce0bb1fbb4e1d72001d485658f4131f048f.tar.bz2
[svn-r3900] 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')
-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..6540e7e 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), "");