diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2001-05-10 13:40:07 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2001-05-10 13:40:07 (GMT) |
commit | 3214f19350c4564e78e4bd7eec79bb2ccda7b024 (patch) | |
tree | df0b79266afadbc1ae579db1a7e0527216522433 /testpar | |
parent | b563af455f683e4aa5bcfc11e0b37b5bdb34a1b6 (diff) | |
download | hdf5-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')
-rw-r--r-- | testpar/t_mpi.c | 2 |
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), ""); |