diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2001-07-02 22:22:32 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2001-07-02 22:22:32 (GMT) |
commit | ee0f7e22189012cc93f54cac6a720fa073648d19 (patch) | |
tree | 71992166b9608ba8e581b4936a5c5a745e73fdae | |
parent | b9c53163469d6a5a7b94cbdbb55250355838e1f5 (diff) | |
download | hdf5-ee0f7e22189012cc93f54cac6a720fa073648d19.zip hdf5-ee0f7e22189012cc93f54cac6a720fa073648d19.tar.gz hdf5-ee0f7e22189012cc93f54cac6a720fa073648d19.tar.bz2 |
[svn-r4097] Purpose:
Bug fixes
Description:
H5FDmpio.c:
H5FD_mpio_flush() would try to file seek negative if the
file->eoa is 0 (e.g., doing mpio on the raw-file of the
split file driver). Put in a code to catch this case
by returning succeed immediately.
H5S.c:
SAF test code exposed an error in the HDF5_MPI_OPT_TYPES
code. The SAF code was doing collective write to chunked
storage dataset. Some processes wanted to flush some chunk
while some other processes were doing something else but the
HDF5_MPI_OPT_TYPES code thought the chunk flushing were collective
calls since it only looked at the condition when H5Dwrite
was called. So, it hanged when doing MPI_File_setview.
For now, turned off the HDF5_MPI_OPT_TYPES code so that the
SAF code would work. More long term fix later.
Solution:
Platforms tested:
eirene (serial and mpich), modi4 -64-serial and -n32-parallel.
-rw-r--r-- | src/H5FDmpio.c | 3 | ||||
-rw-r--r-- | src/H5S.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index d20471f..76417bc 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -1524,6 +1524,9 @@ H5FD_mpio_flush(H5FD_t *_file) * Unfortunately, keeping track of EOF is an expensive operation, so * we can't just check whether EOF<EOA like with other drivers. * Therefore we'll just read the byte at EOA-1 and then write it back. */ + /* But if eoa is zero, then nothing to flush. Just return */ + if (file->eoa == 0) + HRETURN(SUCCEED); if (haddr_to_MPIOff(file->eoa-1, &mpi_off)<0) { HRETURN_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "cannot convert from haddr_t to MPI_Offset"); @@ -40,7 +40,7 @@ static size_t H5S_nconv_g = 0; /*entries used*/ #ifdef H5_HAVE_PARALLEL /* Global var whose value comes from environment variable */ -hbool_t H5_mpi_opt_types_g = TRUE; +hbool_t H5_mpi_opt_types_g = FALSE; #endif /* Declare a free list to manage the H5S_simple_t struct */ @@ -92,9 +92,16 @@ H5S_init_interface(void) { /* Allow MPI buf-and-file-type optimizations? */ const char *s = HDgetenv ("HDF5_MPI_OPT_TYPES"); +#ifdef H5FDmpio_DEBUG + hbool_t oldtmp = H5_mpi_opt_types_g ; +#endif if (s && HDisdigit(*s)) { H5_mpi_opt_types_g = (int)HDstrtol (s, NULL, 0); } +#ifdef H5FDmpio_DEBUG + fprintf(stdout, "H5_mpi_opt_types_g was %ld became %ld\n", + oldtmp, H5_mpi_opt_types_g); +#endif } #endif |