diff options
-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"); |