diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2001-08-20 18:36:58 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2001-08-20 18:36:58 (GMT) |
commit | 82e12143f97fbe9ce09f137004e3118fb745f28e (patch) | |
tree | 115e48bf8b66dc58d90f6ddd249b4629df2b6f61 /src | |
parent | 701966ef0f8d57fd44428a0f318590ce87a6d94c (diff) | |
download | hdf5-82e12143f97fbe9ce09f137004e3118fb745f28e.zip hdf5-82e12143f97fbe9ce09f137004e3118fb745f28e.tar.gz hdf5-82e12143f97fbe9ce09f137004e3118fb745f28e.tar.bz2 |
[svn-r4396] Purpose:
bug fix
Description:
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.
Platforms tested:
modi4(pp)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDmpio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index ab1fbd8..15cc6b8 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -1542,6 +1542,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"); |