From 611ff7258937a90cc63ff4084f6eed421a0ba320 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 2 Mar 2016 23:24:48 -0500 Subject: [svn-r29251] Restored some missing edge chunk optimization code that was not merged. Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1 autotools serial --- src/H5Dchunk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 612b419..f48b059 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -4007,7 +4007,7 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite, HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer") /* Check if there are filters which need to be applied to the chunk */ - if(!nunfilt_edge_chunk_dims) { + if((pline->nused > 0) && !nunfilt_edge_chunk_dims) { size_t nbytes = orig_chunk_size; /* Push the chunk through the filters */ @@ -4054,6 +4054,9 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite, /* collect all chunk addresses to be written to write collectively at the end */ /* allocate/resize address array if no more space left */ + /* Note that if we add support for parallel filters we must + * also store an array of chunk sizes and pass it to the + * apporpriate collective write function */ if(0 == chunk_info.num_io % 1024) if(NULL == (chunk_info.addr = (haddr_t *)H5MM_realloc(chunk_info.addr, (chunk_info.num_io + 1024) * sizeof(haddr_t)))) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed for chunk addresses") -- cgit v0.12