diff options
-rw-r--r-- | src/H5Dio.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c index b58e3f9..c1f6d4b 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -1491,10 +1491,6 @@ UNUSED if (H5T_path_noop(tpath)) { #ifdef H5S_DEBUG H5_timer_begin(&timer); - - /* Get the number of elements selected in this chunk */ - chunk_nelmts=H5S_get_select_npoints(fchunk_info->space); - assert(chunk_nelmts<=nelmts); #endif /* Sanity check dataset, then read it */ assert(dataset->layout.addr!=HADDR_UNDEF || dataset->efl.nused>0 || @@ -1519,6 +1515,12 @@ UNUSED fchunk_info=fchunk_node->data; mchunk_info=mchunk_node->data; +#ifdef H5S_DEBUG + /* Get the number of elements selected in this chunk */ + chunk_nelmts=H5S_get_select_npoints(fchunk_info->space); + assert(chunk_nelmts<=nelmts); +#endif /* H5S_DEBUG */ + /* Pass in chunk's coordinates in a union. */ store.chunk_coords = fchunk_info->coords; @@ -1544,7 +1546,7 @@ UNUSED #ifdef H5S_DEBUG H5_timer_end(&(sconv->stats[1].read_timer), &timer); - sconv->stats[1].read_nbytes += chunk_nelmts * H5T_get_size(dataset->type); + sconv->stats[1].read_nbytes += nelmts * H5T_get_size(dataset->type); sconv->stats[1].read_ncalls++; #endif @@ -1846,10 +1848,6 @@ nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, if (H5T_path_noop(tpath)) { #ifdef H5S_DEBUG H5_timer_begin(&timer); - - /* Get the number of elements selected in this chunk */ - chunk_nelmts=H5S_get_select_npoints(fchunk_info->space); - assert(chunk_nelmts<=nelmts); #endif /* Get first node in chunk trees */ fchunk_node=H5TB_first(fm.fsel->root); @@ -1870,6 +1868,12 @@ nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, fchunk_info=fchunk_node->data; mchunk_info=mchunk_node->data; +#ifdef H5S_DEBUG + /* Get the number of elements selected in this chunk */ + chunk_nelmts=H5S_get_select_npoints(fchunk_info->space); + assert(chunk_nelmts<=nelmts); +#endif /* H5S_DEBUG */ + /* Pass in chunk's coordinates in a union. */ store.chunk_coords = fchunk_info->coords; @@ -1895,7 +1899,7 @@ nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, #ifdef H5S_DEBUG H5_timer_end(&(sconv->stats[0].write_timer), &timer); - sconv->stats[0].write_nbytes += chunk_nelmts * H5T_get_size(mem_type); + sconv->stats[0].write_nbytes += nelmts * H5T_get_size(mem_type); sconv->stats[0].write_ncalls++; #endif |