mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
[svn-r19352] Description:
Align w/changes on revise_chunks branch Tested on: Mac OS X/32 10.6.4 (amazon) w/debug & production (too minor to require h5committest)
This commit is contained in:
parent
b490031679
commit
c5bfe49ea6
@ -1776,12 +1776,6 @@ done:
|
||||
* Programmer: Raymond Lu
|
||||
* Thursday, April 10, 2003
|
||||
*
|
||||
* Modification:Raymond Lu
|
||||
* 4 Feb 2009
|
||||
* One case that was considered cacheable was when the chunk
|
||||
* was bigger than the cache size but not allocated on disk.
|
||||
* I moved it to uncacheable branch to bypass the cache to
|
||||
* improve performance.
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
@ -2667,12 +2661,12 @@ H5D_chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
|
||||
hbool_t relax)
|
||||
{
|
||||
H5D_t *dset = io_info->dset; /* Local pointer to the dataset info */
|
||||
const H5O_pline_t *pline = &(dset->shared->dcpl_cache.pline); /* I/O pipeline info */
|
||||
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
|
||||
const H5O_fill_t *fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
|
||||
const H5O_pline_t *pline = &(dset->shared->dcpl_cache.pline); /* I/O pipeline info - always equal to the pline passed to H5D_chunk_alloc */
|
||||
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
|
||||
const H5O_fill_t *fill = &(dset->shared->dcpl_cache.fill); /* Fill value info */
|
||||
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
|
||||
hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
|
||||
H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache*/
|
||||
H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache*/
|
||||
H5D_rdcc_ent_t *ent = NULL; /*cache entry */
|
||||
haddr_t chunk_addr = HADDR_UNDEF; /* Address of chunk on disk */
|
||||
size_t chunk_size; /*size of a chunk */
|
||||
@ -3665,14 +3659,6 @@ done:
|
||||
* To release the chunks, we traverse the B-tree to obtain a list of unused
|
||||
* allocated chunks, and then call H5B_remove() for each chunk.
|
||||
*
|
||||
* Modifications: Neil Fortner
|
||||
* 4 May 2010
|
||||
* Rewrote algorithm to work in a way similar to
|
||||
* H5D_chunk_allocate: it now iterates over all chunks that need
|
||||
* to be filled or removed, and does so as appropriate. This
|
||||
* avoids various issues with coherency of locally cached data
|
||||
* which could occur with the previous implementation.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
|
@ -261,29 +261,25 @@ static int do_ranks( hid_t fapl )
|
||||
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
if(test_rank1(fapl, dcpl, do_fillvalue, FALSE) < 0)
|
||||
{
|
||||
if(test_rank1(fapl, dcpl, do_fillvalue, FALSE) < 0) {
|
||||
DO_RANKS_PRINT_CONFIG("Rank 1")
|
||||
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET"
|
||||
: "H5D_FILL_TIME_ALLOC"));
|
||||
goto error;
|
||||
} /* end if */
|
||||
if(test_rank2(fapl, dcpl, do_fillvalue, FALSE) < 0)
|
||||
{
|
||||
if(test_rank2(fapl, dcpl, do_fillvalue, FALSE) < 0) {
|
||||
DO_RANKS_PRINT_CONFIG("Rank 2")
|
||||
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET"
|
||||
: "H5D_FILL_TIME_ALLOC"));
|
||||
goto error;
|
||||
} /* end if */
|
||||
if(test_rank3(fapl, dcpl, do_fillvalue, FALSE) < 0)
|
||||
{
|
||||
if(test_rank3(fapl, dcpl, do_fillvalue, FALSE) < 0) {
|
||||
DO_RANKS_PRINT_CONFIG("Rank 3")
|
||||
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET"
|
||||
: "H5D_FILL_TIME_ALLOC"));
|
||||
goto error;
|
||||
} /* end if */
|
||||
if(test_rank2(fapl, dcpl, do_fillvalue, TRUE) < 0)
|
||||
{
|
||||
if(test_rank2(fapl, dcpl, do_fillvalue, TRUE) < 0) {
|
||||
DO_RANKS_PRINT_CONFIG("Rank 2 with non-default indexed storage B-tree")
|
||||
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET"
|
||||
: "H5D_FILL_TIME_ALLOC"));
|
||||
@ -297,23 +293,19 @@ static int do_ranks( hid_t fapl )
|
||||
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
|
||||
TEST_ERROR
|
||||
|
||||
if(test_rank1(fapl, dcpl, do_fillvalue, FALSE) < 0)
|
||||
{
|
||||
if(test_rank1(fapl, dcpl, do_fillvalue, FALSE) < 0) {
|
||||
DO_RANKS_PRINT_CONFIG("Rank 1")
|
||||
goto error;
|
||||
} /* end if */
|
||||
if(test_rank2(fapl, dcpl, do_fillvalue, FALSE) < 0)
|
||||
{
|
||||
if(test_rank2(fapl, dcpl, do_fillvalue, FALSE) < 0) {
|
||||
DO_RANKS_PRINT_CONFIG("Rank 2")
|
||||
goto error;
|
||||
} /* end if */
|
||||
if(test_rank3(fapl, dcpl, do_fillvalue, FALSE) < 0)
|
||||
{
|
||||
if(test_rank3(fapl, dcpl, do_fillvalue, FALSE) < 0) {
|
||||
DO_RANKS_PRINT_CONFIG("Rank 3")
|
||||
goto error;
|
||||
} /* end if */
|
||||
if(test_rank2(fapl, dcpl, do_fillvalue, TRUE) < 0)
|
||||
{
|
||||
if(test_rank2(fapl, dcpl, do_fillvalue, TRUE) < 0) {
|
||||
DO_RANKS_PRINT_CONFIG("Rank 2 with non-default indexed storage B-tree")
|
||||
goto error;
|
||||
} /* end if */
|
||||
@ -363,14 +355,10 @@ static int do_layouts( hid_t fapl )
|
||||
TESTING("storage layout use");
|
||||
|
||||
if (test_layouts( H5D_COMPACT, fapl ) < 0)
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (test_layouts( H5D_CONTIGUOUS, fapl ) < 0)
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
|
||||
PASSED();
|
||||
|
||||
@ -2728,8 +2716,9 @@ static int test_random_rank4( hid_t fapl, hid_t dcpl, hbool_t do_fillvalue,
|
||||
|
||||
/* Main loop */
|
||||
for(i=0; i<RAND4_NITER; i++) {
|
||||
|
||||
/* Generate random write buffer */
|
||||
if(writing && !zero_dim) {
|
||||
/* Generate random write buffer */
|
||||
for(j=0; j<dims[0]; j++)
|
||||
for(k=0; k<dims[1]; k++)
|
||||
for(l=0; l<dims[2]; l++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user