diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-11-10 22:36:04 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-11-10 22:36:04 (GMT) |
commit | 598a66048abae0d5465b7020b6fdeeb541a9c0f7 (patch) | |
tree | 17a7a294874aaa13acecad424c697dea04ec02c6 /src/H5Distore.c | |
parent | 54d42e74c4e5495887b85b720366a87eb1f3eb7d (diff) | |
download | hdf5-598a66048abae0d5465b7020b6fdeeb541a9c0f7.zip hdf5-598a66048abae0d5465b7020b6fdeeb541a9c0f7.tar.gz hdf5-598a66048abae0d5465b7020b6fdeeb541a9c0f7.tar.bz2 |
[svn-r14250] Description:
- Changed name of chunk mapping structure from "fm_map" to "H5D_chunk_map_t"
- Pushed parallel I/O specific fields into ifdef'ed sections, when building
chunk map
- Took out most calls to IS_H5FD_MPI macro
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5Distore.c')
-rw-r--r-- | src/H5Distore.c | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/src/H5Distore.c b/src/H5Distore.c index 399f9f9..848668a 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -2037,15 +2037,7 @@ done: * Function: H5D_istore_if_load * * Purpose: A small internal function to if it's necessary to load the - * chunk into cache. If the chunk is too large to load into - * the cache and it has no filters in the pipeline (i.e. not - * compressed) and if the address for the chunk has been - * defined, then don't load the chunk into the cache, just - * read the data from it directly. If MPI based VFD is used, - * must bypass the chunk-cache scheme because other MPI - * processes could be writing to other elements in the same - * chunk. Do a direct read-through of only the elements - * requested. + * chunk into cache. * * Return: TRUE or FALSE * @@ -2055,18 +2047,33 @@ done: *------------------------------------------------------------------------- */ hbool_t -H5D_istore_if_load(H5D_t *dataset, haddr_t caddr) +H5D_istore_if_load(const H5D_io_info_t *io_info, haddr_t caddr) { + const H5D_t *dataset = io_info->dset; hbool_t ret_value; - FUNC_ENTER_NOAPI_NOINIT(H5D_istore_if_load) + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_if_load) - assert(dataset); + HDassert(io_info); + HDassert(dataset); - if (dataset->shared->dcpl_cache.pline.nused==0 && ((dataset->shared->layout.u.chunk.size > - dataset->shared->cache.chunk.nbytes && caddr!=HADDR_UNDEF) - || (IS_H5FD_MPI(dataset->oloc.file) && (H5F_ACC_RDWR & - H5F_get_intent(dataset->oloc.file))))) { + /* + * If the chunk is too large to load into the cache and it has no + * filters in the pipeline (i.e. not compressed) and if the address + * for the chunk has been defined, then don't load the chunk into the + * cache, just write the data to it directly. + * + * If MPI based VFD is used, must bypass the + * chunk-cache scheme because other MPI processes could be + * writing to other elements in the same chunk. Do a direct + * write-through of only the elements requested. + */ + if(dataset->shared->dcpl_cache.pline.nused==0 && + ((dataset->shared->layout.u.chunk.size > dataset->shared->cache.chunk.nbytes && caddr != HADDR_UNDEF) +#ifdef H5_HAVE_PARALLEL + || (io_info->using_mpi_vfd && (H5F_ACC_RDWR & H5F_get_intent(dataset->oloc.file))) +#endif /* H5_HAVE_PARALLEL */ + )) { ret_value = FALSE; } else ret_value = TRUE; @@ -2143,7 +2150,7 @@ HDfprintf(stderr,"%s: buf=%p\n",FUNC,buf); * writing to other elements in the same chunk. Do a direct * read-through of only the elements requested. */ - if (!H5D_istore_if_load(dset, chunk_addr)) { + if(!H5D_istore_if_load(io_info, chunk_addr)) { H5D_io_info_t chk_io_info; /* Temporary I/O info object */ H5D_storage_t chk_store; /* Chunk storage information */ @@ -2326,7 +2333,7 @@ HDfprintf(stderr,"%s: mem_offset_arr[%Zu]=%Hu\n",FUNC,*mem_curr_seq,mem_offset_a * writing to other elements in the same chunk. Do a direct * write-through of only the elements requested. */ - if (!H5D_istore_if_load(dset, chunk_addr)) { + if(!H5D_istore_if_load(io_info, chunk_addr)) { H5D_io_info_t chk_io_info; /* Temporary I/O info object */ H5D_storage_t chk_store; /* Chunk storage information */ |