diff options
author | MuQun Yang <ymuqun@hdfgroup.org> | 2006-02-21 22:10:23 (GMT) |
---|---|---|
committer | MuQun Yang <ymuqun@hdfgroup.org> | 2006-02-21 22:10:23 (GMT) |
commit | c0fbd63983657883d33abb9f71affa327a3f3fde (patch) | |
tree | deaf9b79d6fb1ecebf37f78838fe9a9a5c66acf4 | |
parent | a6038b946e77407caa54b15b6a2be405f52d1b08 (diff) | |
download | hdf5-c0fbd63983657883d33abb9f71affa327a3f3fde.zip hdf5-c0fbd63983657883d33abb9f71affa327a3f3fde.tar.gz hdf5-c0fbd63983657883d33abb9f71affa327a3f3fde.tar.bz2 |
[svn-r11961] Purpose:
Bug fix in collective IO code
Description:
When select none occurs in one process, fm->select_chunk hasn't been allocated the memory(not allocated until create_file_hyper); however, this needs to be checked; it was caught with cmpi at NCSA linux cluster.
Solution:
Relocate the place to allocate the memory space for fm->select_chunk.
Platforms tested:
cmpi at tungsten
mpich at heping
kind of minor and let daily test catch other errors.
Misc. update:
This won't fix the failure at mir.
-rw-r--r-- | src/H5Dio.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c index 167ab22..a6a3793 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -2186,10 +2186,15 @@ H5D_create_chunk_map(const H5D_t *dataset, const H5T_t *mem_type, const H5S_t *f HGOTO_ERROR (H5E_INTERNAL, H5E_BADVALUE, FAIL, "can't compute 'down' sizes") /* calculate total chunk in file map*/ - fm->select_chunk = NULL; fm->total_chunks = 1; for(u=0; u<fm->f_ndims; u++) fm->total_chunks= fm->total_chunks*fm->chunks[u]; + if(IS_H5FD_MPI(dataset->oloc.file)) { + + if(NULL == (fm->select_chunk = (hbool_t *) H5MM_calloc(fm->total_chunks*sizeof(hbool_t)))) + HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info") + } + @@ -2481,10 +2486,6 @@ H5D_create_chunk_file_map_hyper(fm_map *fm,const H5D_t *dset) end[u]=(coords[u]+fm->chunk_dim[u])-1; } /* end for */ - if(IS_H5FD_MPI(dset->oloc.file)) { - if(NULL == (fm->select_chunk = (hbool_t *) H5MM_calloc(fm->total_chunks*sizeof(hbool_t)))) - HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate chunk info") - } /* Calculate the index of this chunk */ if(H5V_chunk_index(fm->f_ndims,coords,fm->layout->u.chunk.dim,fm->down_chunks,&chunk_index)<0) |