diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-03 15:54:16 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-03 15:54:16 (GMT) |
commit | 65dc3358db37b04cc64b65b88065cbaf48e63a8b (patch) | |
tree | 41244d303977ed2870388bd782da9d19fc543270 /src/H5Dmpio.c | |
parent | 33a65add7db18a4efd2b34ac8261c2065820ebf9 (diff) | |
download | hdf5-65dc3358db37b04cc64b65b88065cbaf48e63a8b.zip hdf5-65dc3358db37b04cc64b65b88065cbaf48e63a8b.tar.gz hdf5-65dc3358db37b04cc64b65b88065cbaf48e63a8b.tar.bz2 |
[svn-r16537] Description:
Merge r16500:16536 from trunk into revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.6 (amazon) in debug mode
Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5Dmpio.c')
-rw-r--r-- | src/H5Dmpio.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 19be413..e4dd8b5 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -1209,6 +1209,7 @@ if(H5DEBUG(D)) void *chunk; /* Pointer to the data chunk in cache */ uint32_t accessed_bytes; /* Total accessed size in a chunk */ unsigned idx_hint = 0; /* Cache index hint */ + htri_t cacheable; /* Whether the chunk is cacheable */ /* Switch to independent I/O */ if(last_xfer_mode != H5FD_MPIO_INDEPENDENT) { @@ -1224,7 +1225,10 @@ if(H5DEBUG(D)) HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk info from skipped list") /* Load the chunk into cache and lock it. */ - if(H5D_chunk_cacheable(io_info)) { + if((cacheable = H5D_chunk_cacheable(io_info, udata.addr, + io_info->op_type == H5D_IO_OP_WRITE)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable") + if(cacheable) { hbool_t entire_chunk = TRUE; /* Whether whole chunk is selected */ /* Compute # of bytes accessed in chunk */ @@ -1268,7 +1272,7 @@ if(H5DEBUG(D)) } /* end else */ /* Release the cache lock on the chunk. */ - if(chunk && H5D_chunk_unlock(io_info, (io_info->op_type == H5D_IO_OP_WRITE), idx_hint, chunk, accessed_bytes) < 0) + if(chunk && H5D_chunk_unlock(io_info, &udata, (io_info->op_type == H5D_IO_OP_WRITE), idx_hint, chunk, accessed_bytes) < 0) HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk") } /* end if */ #else /* !defined(H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS) || !defined(H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS) */ @@ -1439,17 +1443,21 @@ if(H5DEBUG(D)) { /* Independent I/O */ if(make_ind) { - void *chunk; /* Pointer to the data chunk in cache */ + void *chunk; /* Pointer to the data chunk in cache */ H5D_io_info_t *chk_io_info; /* Pointer to I/O info object for this chunk */ - uint32_t accessed_bytes = 0; /* Total accessed size in a chunk */ - unsigned idx_hint = 0; /* Cache index hint */ + uint32_t accessed_bytes = 0; /* Total accessed size in a chunk */ + unsigned idx_hint = 0; /* Cache index hint */ + htri_t cacheable; /* Whether the chunk is cacheable */ /* Switch to independent I/O */ if(H5D_ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_INDEPENDENT) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to independent I/O") /* Load the chunk into cache and lock it. */ - if(H5D_chunk_cacheable(io_info)) { + if((cacheable = H5D_chunk_cacheable(io_info, udata.addr, + io_info->op_type == H5D_IO_OP_WRITE)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable") + if(cacheable) { hbool_t entire_chunk = TRUE; /* Whether whole chunk is selected */ /* Compute # of bytes accessed in chunk */ @@ -1494,7 +1502,7 @@ if(H5DEBUG(D)) { /* Release the cache lock on the chunk. */ if(chunk) - if(H5D_chunk_unlock(io_info, (io_info->op_type == H5D_IO_OP_WRITE), idx_hint, chunk, accessed_bytes) < 0) + if(H5D_chunk_unlock(io_info, &udata, (io_info->op_type == H5D_IO_OP_WRITE), idx_hint, chunk, accessed_bytes) < 0) HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk") } /* end if */ else { /*collective I/O */ |