From 14f88c168f75d18761a40c07aa2515896e009c48 Mon Sep 17 00:00:00 2001 From: MuQun Yang Date: Wed, 8 Dec 2004 18:30:40 -0500 Subject: [svn-r9648] Purpose: bug fix Description: The irregular hyperslab span_tree implementation inside H5S_hyper_add_span_element_helper updating the high bound of the span, but forget updating the number of element of the span. New routine obtain_derived_datatype catches the bug. Solution: Updating the number of element of the span as well. Platforms tested: Linux 2.4 and AIX 5.1, both with parallel enabled. Misc. update: --- src/H5Shyper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 2bc8dcc..5a01f6a 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -3231,6 +3231,7 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran /* Increase size of previous span */ tmp2_span->high++; + tmp2_span->nelem++; /* Reset the 'tmp_span' for the rest of this block's algorithm */ tmp_span=tmp2_span; @@ -3274,6 +3275,7 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran /* Does new node adjoin existing node? */ if(tmp_span->high+1==coords[0]) { tmp_span->high++; + tmp_span->nelem++; /* Check if this span tree should now be merged with a level higher in the tree */ if(prev_span_info!=NULL) { @@ -3296,6 +3298,7 @@ H5S_hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ran /* Increase size of previous span */ tmp2_span->high++; + tmp2_span->nelem++; /* Update pointers */ tmp2_span->next=NULL; -- cgit v0.12