summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-07-02 23:15:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-07-02 23:15:06 (GMT)
commitd643e648f3536f89af7b8a622c297de028eb1d7a (patch)
tree3755161ac74b96453d6bc7faef6ed04c5644c672 /src
parentc243e1e13456365b0b555a9c82d5cc17f1436727 (diff)
downloadhdf5-d643e648f3536f89af7b8a622c297de028eb1d7a.zip
hdf5-d643e648f3536f89af7b8a622c297de028eb1d7a.tar.gz
hdf5-d643e648f3536f89af7b8a622c297de028eb1d7a.tar.bz2
[svn-r17149] Description:
Fix a couple of problems with r17148 checkin that were found by pickier compilers. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) 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 debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.7 (amazon) in debug mode Mac OS X/32 10.5.7 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src')
-rw-r--r--src/H5Dchunk.c19
-rw-r--r--src/H5Pdcpl.c2
2 files changed, 2 insertions, 19 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index ba80de2..d210f6d 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -3890,7 +3890,6 @@ H5D_chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[])
HDassert(dset);
HDassert(dset->shared);
HDassert(chunk_addr);
- HDassert(down_chunks);
/* Set up user data for B-tree callback */
HDmemset(&udata, 0, sizeof(udata));
@@ -3988,10 +3987,6 @@ H5D_chunk_update_cache(H5D_t *dset, hid_t dxpl_id)
H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
unsigned rank; /*current # of dimensions */
- hsize_t curr_dims[H5O_LAYOUT_NDIMS]; /*current dataspace dimensions */
- hsize_t chunks[H5O_LAYOUT_NDIMS]; /*current number of chunks in each dimension */
- hsize_t down_chunks[H5O_LAYOUT_NDIMS]; /* "down" size of number of elements in each dimension */
- unsigned u; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5D_chunk_update_cache, FAIL)
@@ -4008,18 +4003,6 @@ H5D_chunk_update_cache(H5D_t *dset, hid_t dxpl_id)
if(rank == 1)
HGOTO_DONE(SUCCEED)
- /* Go get the dimensions */
- if(H5S_get_simple_extent_dims(dset->shared->space, curr_dims, NULL) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions")
-
- /* Round up to the next integer # of chunks, to accomodate partial chunks */
- for(u = 0; u < rank; u++)
- chunks[u] = ((curr_dims[u] + dset->shared->layout.u.chunk.dim[u]) - 1) / dset->shared->layout.u.chunk.dim[u];
-
- /* Get the "down" sizes for each dimension */
- if(H5V_array_down(rank, chunks, down_chunks) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, FAIL, "can't compute 'down' sizes")
-
/* Fill the DXPL cache values for later use */
if(H5D_get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
@@ -4033,7 +4016,7 @@ H5D_chunk_update_cache(H5D_t *dset, hid_t dxpl_id)
next = ent->next;
/* Calculate the index of this chunk */
- if(H5V_chunk_index(rank, ent->offset, dset->shared->layout.u.chunk.dim, down_chunks, &idx) < 0)
+ if(H5V_chunk_index(rank, ent->offset, dset->shared->layout.u.chunk.dim, dset->shared->layout.u.chunk.down_chunks, &idx) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index")
/* Compute the index for the chunk entry */
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index cd4e98c..7ed1b96 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -50,7 +50,7 @@
/* Define default layout information */
#define H5D_DEF_LAYOUT_COMPACT_INIT {(hbool_t)FALSE, (size_t)0, NULL}
#define H5D_DEF_LAYOUT_CONTIG_INIT {HADDR_UNDEF, (hsize_t)0}
-#define H5D_DEF_LAYOUT_CHUNK_INIT {H5D_CHUNK_BTREE, (unsigned)1, {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, (uint32_t)0, NULL, {{HADDR_UNDEF, NULL}}}
+#define H5D_DEF_LAYOUT_CHUNK_INIT {H5D_CHUNK_BTREE, (unsigned)1, {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, (uint32_t)0, (hsize_t)0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, NULL, {{HADDR_UNDEF, NULL}}}
#ifdef H5_HAVE_C99_DESIGNATED_INITIALIZER
#define H5D_DEF_LAYOUT_COMPACT {H5D_COMPACT, H5O_LAYOUT_VERSION_3, NULL, { .compact = H5D_DEF_LAYOUT_COMPACT_INIT }}
#define H5D_DEF_LAYOUT_CONTIG {H5D_CONTIGUOUS, H5O_LAYOUT_VERSION_3, NULL, { .contig = H5D_DEF_LAYOUT_CONTIG_INIT }}