diff options
author | Albert Cheng <acheng@hdfgroup.org> | 1999-05-25 17:31:51 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 1999-05-25 17:31:51 (GMT) |
commit | 9282a3e3575d7e3af855bea6ddd4d1a0ba511671 (patch) | |
tree | dcf3c131dc21be42c403bfbd22e1eea16ff04388 /src/H5F.c | |
parent | 20811af57b59f90ddd9be565595c0db5371c0116 (diff) | |
download | hdf5-9282a3e3575d7e3af855bea6ddd4d1a0ba511671.zip hdf5-9282a3e3575d7e3af855bea6ddd4d1a0ba511671.tar.gz hdf5-9282a3e3575d7e3af855bea6ddd4d1a0ba511671.tar.bz2 |
[svn-r1276] H5D.c:
H5F.c:
H5Flow.c:
H5Fprivate.h:
Joined work by Quincey, Robb and me to eliminate the initial writes
of BOOTBLOCK when the file is first created. Also, eliminate the
repeatedly encoding of BOOTBLOCK in the flushing code. Introduced
the eof_written flag to indicate when it is not necessary to go
do a dumb write at eof.
(But something is not right if the userblock is not zero.)
H5Fmpio.c:
Added code to allow setting the MPIO debug output mask via
the environment variable H5F_mpio_Debug.
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -1609,6 +1609,7 @@ H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate) { uint8_t buf[2048], *p = buf; haddr_t reserved_addr; + uintn firsttime_bootblock=0; uintn nerrors=0, i; FUNC_ENTER(H5F_flush, FAIL); @@ -1677,20 +1678,23 @@ H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate) H5F_addr_reset(&(f->shared->hdf5_eof)); H5F_addr_inc(&(f->shared->hdf5_eof), (hsize_t)(p-buf)); H5F_low_seteof(f->shared->lf, &(f->shared->hdf5_eof)); + firsttime_bootblock=1; } /* write the boot block to disk */ + if(!firsttime_bootblock) { #ifdef HAVE_PARALLEL - H5F_mpio_tas_allsame(f->shared->lf, TRUE); /* only p0 will write */ + H5F_mpio_tas_allsame(f->shared->lf, TRUE); /* only p0 will write */ #endif - if (H5F_low_write(f->shared->lf, f->shared->access_parms, &H5F_xfer_dflt, - &(f->shared->boot_addr), (size_t)(p-buf), buf)<0) { - HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write header"); - } + if (H5F_low_write(f->shared->lf, f->shared->access_parms, &H5F_xfer_dflt, + &(f->shared->boot_addr), (size_t)(p-buf), buf)<0) { + HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write header"); + } - /* Flush file buffers to disk */ - if (H5F_low_flush(f->shared->lf, f->shared->access_parms) < 0) { - HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low level flush failed"); + /* Flush file buffers to disk */ + if (H5F_low_flush(f->shared->lf, f->shared->access_parms) < 0) { + HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low level flush failed"); + } } /* Check flush errors for children - errors are already on the stack */ |