diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-02 18:49:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-02 18:49:09 (GMT) |
commit | 4f7970f9f078942bcb7c1e92f98ed798ccc55025 (patch) | |
tree | d67617b545037294e6a9d62913dbf0fb4f9012ad /test/earray.c | |
parent | 8e9bb8af7ccf58e7665a0af4a99c946ad8cb92b2 (diff) | |
download | hdf5-4f7970f9f078942bcb7c1e92f98ed798ccc55025.zip hdf5-4f7970f9f078942bcb7c1e92f98ed798ccc55025.tar.gz hdf5-4f7970f9f078942bcb7c1e92f98ed798ccc55025.tar.bz2 |
[svn-r15755] Description:
Fix some minor problems w/extensible array super blocks and extend
tests.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (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/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
Diffstat (limited to 'test/earray.c')
-rw-r--r-- | test/earray.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/earray.c b/test/earray.c index 5f75596..83759d8 100644 --- a/test/earray.c +++ b/test/earray.c @@ -969,6 +969,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam, H5F_t *f = NULL; /* Internal file object pointer */ H5EA_t *ea = NULL; /* Extensible array wrapper */ earray_state_t state; /* State of extensible array */ + unsigned base_sblk_idx = UINT_MAX; /* Starting index for actual superblocks */ uint64_t welmt; /* Element to write */ uint64_t relmt; /* Element to read */ hsize_t nelmts_written; /* Highest element written in array */ @@ -1056,11 +1057,24 @@ HDfprintf(stderr, "idx = %Hu, tparam->sblk_info[%u] = {%Zu, %Zu, %Hu, %Hu}\n", i #ifdef QAK HDfprintf(stderr, "state.nelmts = %Hu\n", state.nelmts); #endif /* QAK */ + state.ndata_blks = 1 + tparam->sblk_info[sblk_idx].start_dblk + ((idx - (cparam->idx_blk_elmts + tparam->sblk_info[sblk_idx].start_idx)) / tparam->sblk_info[sblk_idx].dblk_nelmts); #ifdef QAK HDfprintf(stderr, "state.ndata_blks = %Hu\n", state.ndata_blks); #endif /* QAK */ + + /* Check if we have any super blocks yet */ + if(tparam->sblk_info[sblk_idx].ndblks >= cparam->sup_blk_min_data_ptrs) { + /* Check if this is the first superblock */ + if(sblk_idx < base_sblk_idx) + base_sblk_idx = sblk_idx; + + state.nsuper_blks = (sblk_idx - base_sblk_idx) + 1; +#ifdef QAK +HDfprintf(stderr, "state.nsuper_blks = %Hu\n", state.nsuper_blks); +#endif /* QAK */ + } /* end if */ } /* end else */ if(check_stats(ea, &state)) TEST_ERROR @@ -1200,9 +1214,7 @@ main(void) nerrors += test_set_elmts(fapl, &cparam, &tparam, (hsize_t)(cparam.idx_blk_elmts + (11 * cparam.data_blk_min_elmts)), "setting all elements of array's fifth data block"); nerrors += test_set_elmts(fapl, &cparam, &tparam, (hsize_t)(cparam.idx_blk_elmts + (11 * cparam.data_blk_min_elmts) + 1), "setting first element of array's sixth data block"); nerrors += test_set_elmts(fapl, &cparam, &tparam, (hsize_t)(cparam.idx_blk_elmts + (15 * cparam.data_blk_min_elmts)), "setting all elements of array's sixth data block"); -#ifdef NOT_YET nerrors += test_set_elmts(fapl, &cparam, &tparam, (hsize_t)(cparam.idx_blk_elmts + (15 * cparam.data_blk_min_elmts) + 1), "setting first element of array's seventh data block"); -#endif /* NOT_YET */ /* Close down testing parameters */ finish_tparam(&tparam); |