summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-11-29 17:44:50 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-11-29 17:44:50 (GMT)
commit44fa94541b3de90b358f4921725bab2cbe953c4d (patch)
tree0ff29c0eff0bb91848dc3e675a245974c0cfd146
parent25d86f39b6aa7e5b521a0fe7a241ff588c7b77fc (diff)
downloadhdf5-44fa94541b3de90b358f4921725bab2cbe953c4d.zip
hdf5-44fa94541b3de90b358f4921725bab2cbe953c4d.tar.gz
hdf5-44fa94541b3de90b358f4921725bab2cbe953c4d.tar.bz2
[svn-r14306] Description:
Add call to reset cached chunk info after initialization of chunk data storage. Tested on: Linux/64 2.4(smirom) w/parallel
-rw-r--r--src/H5Dcontig.c8
-rw-r--r--src/H5Dint.c2
-rw-r--r--src/H5Dio.c96
-rw-r--r--src/H5Distore.c53
-rw-r--r--src/H5FDmpio.c95
5 files changed, 125 insertions, 129 deletions
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index e1a02cb..bdb8294 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -660,7 +660,7 @@ H5D_contig_writevv(const H5D_io_info_t *io_info,
H5F_t *file = io_info->dset->oloc.file; /* File for dataset */
H5D_rdcdc_t *dset_contig=&(io_info->dset->shared->cache.contig); /* Cached information about contiguous data */
const H5D_contig_storage_t *store_contig=&(io_info->store->contig); /* Contiguous storage info for this I/O operation */
- const unsigned char *buf=_buf; /* Pointer to buffer to fill */
+ const unsigned char *buf=(const unsigned char *)_buf; /* Pointer to buffer to fill */
haddr_t addr; /* Actual address to read */
size_t total_size=0; /* Size of sequence in bytes */
size_t size; /* Size of sequence in bytes */
@@ -1203,11 +1203,11 @@ done:
if(H5I_dec_ref(tid_mem) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
if(buf)
- H5FL_BLK_FREE(type_conv, buf);
+ (void)H5FL_BLK_FREE(type_conv, buf);
if(reclaim_buf)
- H5FL_BLK_FREE(type_conv, reclaim_buf);
+ (void)H5FL_BLK_FREE(type_conv, reclaim_buf);
if(bkg)
- H5FL_BLK_FREE(type_conv, bkg);
+ (void)H5FL_BLK_FREE(type_conv, bkg);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_contig_copy() */
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 94b53d3..4340578 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1771,7 +1771,7 @@ H5D_alloc_storage(H5F_t *f, hid_t dxpl_id, H5D_t *dset/*in,out*/, H5D_time_alloc
*/
if(dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY
&& time_alloc == H5D_ALLOC_EXTEND)
- must_init_space = 1;
+ must_init_space = TRUE;
break;
case H5D_COMPACT:
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 5950c22..d3df42a 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -160,7 +160,7 @@ H5D_get_dxpl_cache_real(hid_t dxpl_id, H5D_dxpl_cache_t *cache)
assert(cache);
/* Get the dataset transfer property list */
- if (NULL == (dx_plist = H5I_object(dxpl_id)))
+ if (NULL == (dx_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Get maximum temporary buffer size */
@@ -301,12 +301,12 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
plist_id, buf);
/* check arguments */
- if(NULL == (dset = H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
if(NULL == dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
if(H5S_ALL != mem_space_id) {
- if(NULL == (mem_space = H5I_object_verify(mem_space_id, H5I_DATASPACE)))
+ if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
/* Check for valid selection */
@@ -314,7 +314,7 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent")
} /* end if */
if(H5S_ALL != file_space_id) {
- if(NULL == (file_space = H5I_object_verify(file_space_id, H5I_DATASPACE)))
+ if(NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
/* Check for valid selection */
@@ -393,12 +393,12 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
plist_id, buf);
/* check arguments */
- if(NULL == (dset = H5I_object_verify(dset_id, H5I_DATASET)))
+ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
if(NULL == dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
if(H5S_ALL != mem_space_id) {
- if(NULL == (mem_space = H5I_object_verify(mem_space_id, H5I_DATASPACE)))
+ if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
/* Check for valid selection */
@@ -406,7 +406,7 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "memory selection+offset not within extent")
} /* end if */
if(H5S_ALL != file_space_id) {
- if(NULL == (file_space = H5I_object_verify(file_space_id, H5I_DATASPACE)))
+ if(NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
/* Check for valid selection */
@@ -474,7 +474,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
HDassert(dataset && dataset->oloc.file);
/* Get memory datatype */
- if(NULL == (mem_type = H5I_object_verify(mem_type_id, H5I_DATATYPE)))
+ if(NULL == (mem_type = (const H5T_t *)H5I_object_verify(mem_type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
if(!file_space)
@@ -616,7 +616,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
HDassert(dataset && dataset->oloc.file);
/* Get the memory datatype */
- if(NULL == (mem_type = H5I_object_verify(mem_type_id, H5I_DATATYPE)))
+ if(NULL == (mem_type = (const H5T_t *)H5I_object_verify(mem_type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
/* All filters in the DCPL must have encoding enabled. */
@@ -917,15 +917,15 @@ H5D_contig_read(H5D_io_info_t *io_info, hsize_t nelmts,
} else {
need_bkg = H5T_BKG_NO; /*never needed even if app says yes*/
} /* end else */
- if (NULL==(tconv_buf=dxpl_cache->tconv_buf)) {
+ if(NULL == (tconv_buf = (uint8_t *)dxpl_cache->tconv_buf)) {
/* Allocate temporary buffer */
- if((tconv_buf=H5FL_BLK_MALLOC(type_conv,target_size))==NULL)
+ if(NULL == (tconv_buf = H5FL_BLK_MALLOC(type_conv, target_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
} /* end if */
- if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) {
+ if(need_bkg && NULL == (bkg_buf = (uint8_t *)dxpl_cache->bkgr_buf)) {
/* Allocate background buffer */
/* (Need calloc()-like call since memory needs to be initialized) */
- if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL)
+ if(NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, (request_nelmts * dst_type_size))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion")
} /* end if */
@@ -1034,9 +1034,9 @@ done:
} /* end if */
if (tconv_buf && NULL==dxpl_cache->tconv_buf)
- H5FL_BLK_FREE(type_conv,tconv_buf);
+ (void)H5FL_BLK_FREE(type_conv,tconv_buf);
if (bkg_buf && NULL==dxpl_cache->bkgr_buf)
- H5FL_BLK_FREE(type_conv,bkg_buf);
+ (void)H5FL_BLK_FREE(type_conv,bkg_buf);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_contig_read() */
@@ -1195,15 +1195,15 @@ H5D_contig_write(H5D_io_info_t *io_info, hsize_t nelmts,
} else {
need_bkg = H5T_BKG_NO; /*never needed even if app says yes*/
} /* end else */
- if (NULL==(tconv_buf=dxpl_cache->tconv_buf)) {
+ if(NULL == (tconv_buf = (uint8_t *)dxpl_cache->tconv_buf)) {
/* Allocate temporary buffer */
- if((tconv_buf=H5FL_BLK_MALLOC(type_conv,target_size))==NULL)
+ if(NULL == (tconv_buf = H5FL_BLK_MALLOC(type_conv, target_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
} /* end if */
- if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) {
+ if(need_bkg && NULL == (bkg_buf = (uint8_t *)dxpl_cache->bkgr_buf)) {
/* Allocate background buffer */
/* (Don't need calloc()-like call since file data is already initialized) */
- if((bkg_buf=H5FL_BLK_MALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL)
+ if(NULL == (bkg_buf = H5FL_BLK_MALLOC(type_conv, (request_nelmts * dst_type_size))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion")
} /* end if */
@@ -1302,9 +1302,9 @@ done:
} /* end if */
if (tconv_buf && NULL==dxpl_cache->tconv_buf)
- H5FL_BLK_FREE(type_conv,tconv_buf);
+ (void)H5FL_BLK_FREE(type_conv,tconv_buf);
if (bkg_buf && NULL==dxpl_cache->bkgr_buf)
- H5FL_BLK_FREE(type_conv,bkg_buf);
+ (void)H5FL_BLK_FREE(type_conv,bkg_buf);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_contig_write() */
@@ -1418,7 +1418,7 @@ H5D_chunk_read(H5D_io_info_t *io_info, hsize_t nelmts,
H5D_chunk_info_t *chunk_info; /* chunk information */
/* Get the actual chunk information from the skip list node */
- chunk_info = H5SL_item(chunk_node);
+ chunk_info = (H5D_chunk_info_t *)H5SL_item(chunk_node);
/* Pass in chunk's coordinates in a union. */
store.chunk.offset = chunk_info->coords;
@@ -1506,15 +1506,15 @@ H5D_chunk_read(H5D_io_info_t *io_info, hsize_t nelmts,
} else {
need_bkg = H5T_BKG_NO; /*never needed even if app says yes*/
} /* end else */
- if (NULL==(tconv_buf=dxpl_cache->tconv_buf)) {
+ if(NULL == (tconv_buf = (uint8_t *)dxpl_cache->tconv_buf)) {
/* Allocate temporary buffer */
- if((tconv_buf=H5FL_BLK_MALLOC(type_conv,target_size))==NULL)
+ if(NULL == (tconv_buf = H5FL_BLK_MALLOC(type_conv, target_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
} /* end if */
- if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) {
+ if(need_bkg && NULL == (bkg_buf = (uint8_t *)dxpl_cache->bkgr_buf)) {
/* Allocate background buffer */
/* (Need calloc()-like call since memory needs to be initialized) */
- if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL)
+ if(NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, (request_nelmts * dst_type_size))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion")
} /* end if */
@@ -1528,7 +1528,7 @@ H5D_chunk_read(H5D_io_info_t *io_info, hsize_t nelmts,
H5D_chunk_info_t *chunk_info; /* chunk information */
/* Get the actual chunk information from the skip list nodes */
- chunk_info=H5SL_item(chunk_node);
+ chunk_info = (H5D_chunk_info_t *)H5SL_item(chunk_node);
/* initialize selection iterator */
if (H5S_select_iter_init(&file_iter, chunk_info->fspace, src_type_size) < 0)
@@ -1690,9 +1690,9 @@ done:
} /* end if */
if(tconv_buf && NULL == dxpl_cache->tconv_buf)
- H5FL_BLK_FREE(type_conv, tconv_buf);
+ (void)H5FL_BLK_FREE(type_conv, tconv_buf);
if(bkg_buf && NULL == dxpl_cache->bkgr_buf)
- H5FL_BLK_FREE(type_conv, bkg_buf);
+ (void)H5FL_BLK_FREE(type_conv, bkg_buf);
/* Release chunk mapping information */
if(H5D_destroy_chunk_map(&fm) < 0)
@@ -1816,7 +1816,7 @@ H5D_chunk_write(H5D_io_info_t *io_info, hsize_t nelmts,
H5D_chunk_info_t *chunk_info; /* Chunk information */
/* Get the actual chunk information from the skip list node */
- chunk_info=H5SL_item(chunk_node);
+ chunk_info = (H5D_chunk_info_t *)H5SL_item(chunk_node);
/* Pass in chunk's coordinates in a union. */
store.chunk.offset = chunk_info->coords;
@@ -1913,15 +1913,15 @@ H5D_chunk_write(H5D_io_info_t *io_info, hsize_t nelmts,
} else {
need_bkg = H5T_BKG_NO; /*never needed even if app says yes*/
} /* end else */
- if (NULL==(tconv_buf=dxpl_cache->tconv_buf)) {
+ if(NULL == (tconv_buf = (uint8_t *)dxpl_cache->tconv_buf)) {
/* Allocate temporary buffer */
- if((tconv_buf=H5FL_BLK_MALLOC(type_conv,target_size))==NULL)
+ if(NULL == (tconv_buf = H5FL_BLK_MALLOC(type_conv, target_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
} /* end if */
- if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) {
+ if(need_bkg && NULL == (bkg_buf = (uint8_t *)dxpl_cache->bkgr_buf)) {
/* Allocate background buffer */
/* (Don't need calloc()-like call since file data is already initialized) */
- if((bkg_buf=H5FL_BLK_MALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL)
+ if(NULL == (bkg_buf = H5FL_BLK_MALLOC(type_conv, (request_nelmts * dst_type_size))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion")
} /* end if */
@@ -1935,7 +1935,7 @@ H5D_chunk_write(H5D_io_info_t *io_info, hsize_t nelmts,
H5D_chunk_info_t *chunk_info; /* chunk information */
/* Get the actual chunk information from the skip list node */
- chunk_info=H5SL_item(chunk_node);
+ chunk_info = (H5D_chunk_info_t *)H5SL_item(chunk_node);
/* initialize selection iterator */
if (H5S_select_iter_init(&file_iter, chunk_info->fspace, dst_type_size) < 0)
@@ -2102,9 +2102,9 @@ done:
} /* end if */
if (tconv_buf && NULL==dxpl_cache->tconv_buf)
- H5FL_BLK_FREE(type_conv,tconv_buf);
+ (void)H5FL_BLK_FREE(type_conv,tconv_buf);
if (bkg_buf && NULL==dxpl_cache->bkgr_buf)
- H5FL_BLK_FREE(type_conv,bkg_buf);
+ (void)H5FL_BLK_FREE(type_conv,bkg_buf);
/* Release chunk mapping information */
if(H5D_destroy_chunk_map(&fm) < 0)
@@ -2196,7 +2196,7 @@ H5D_compound_opt_read(size_t nelmts, const H5S_t *space,
off=_off;
} /* end else */
- if (NULL == (src = H5I_object(src_id)) || NULL == (dst = H5I_object(dst_id)))
+ if (NULL == (src = (H5T_t *)H5I_object(src_id)) || NULL == (dst = (H5T_t *)H5I_object(dst_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
src_stride = H5T_get_size(src);
@@ -2302,7 +2302,7 @@ H5D_compound_opt_write(size_t nelmts, hid_t src_id, hid_t dst_id, void *data_buf
assert (data_buf);
assert (nelmts>0);
- if (NULL == (src = H5I_object(src_id)) || NULL == (dst = H5I_object(dst_id)))
+ if (NULL == (src = (H5T_t *)H5I_object(src_id)) || NULL == (dst = (H5T_t *)H5I_object(dst_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
src_stride = H5T_get_size(src);
@@ -2460,7 +2460,7 @@ H5D_create_chunk_map(H5D_chunk_map_t *fm, const H5D_io_info_t *io_info,
H5D_chunk_info_t *chunk_info; /* Pointer chunk information */
/* Get pointer to chunk's information */
- chunk_info=H5SL_item(curr_node);
+ chunk_info = (H5D_chunk_info_t *)H5SL_item(curr_node);
assert(chunk_info);
/* Clean hyperslab span's "scratch" information */
@@ -2535,7 +2535,7 @@ H5D_create_chunk_map(H5D_chunk_map_t *fm, const H5D_io_info_t *io_info,
H5D_chunk_info_t *chunk_info; /* Pointer chunk information */
/* Get pointer to chunk's information */
- chunk_info=H5SL_item(curr_node);
+ chunk_info = (H5D_chunk_info_t *)H5SL_item(curr_node);
assert(chunk_info);
/* Clean hyperslab span's "scratch" information */
@@ -2981,7 +2981,7 @@ H5D_create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
curr_node=H5SL_first(fm->fsel);
/* Get pointer to chunk's information */
- chunk_info=H5SL_item(curr_node);
+ chunk_info = (H5D_chunk_info_t *)H5SL_item(curr_node);
assert(chunk_info);
/* Just point at the memory dataspace & selection */
@@ -3014,7 +3014,7 @@ H5D_create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
H5D_chunk_info_t *chunk_info; /* Pointer to chunk information */
/* Get pointer to chunk's information */
- chunk_info=H5SL_item(curr_node);
+ chunk_info = (H5D_chunk_info_t *)H5SL_item(curr_node);
assert(chunk_info);
/* Copy the information */
@@ -3092,7 +3092,7 @@ H5D_chunk_file_cb(void UNUSED *elem, hid_t UNUSED type_id, unsigned ndims, const
* find the chunk in the skip list.
*/
/* Get the chunk node from the skip list */
- if((chunk_info=H5SL_search(fm->fsel,&chunk_index))==NULL) {
+ if(NULL == (chunk_info = (H5D_chunk_info_t *)H5SL_search(fm->fsel, &chunk_index))) {
H5S_t *fspace; /* Memory chunk's dataspace */
/* Allocate the file & memory chunk information */
@@ -3203,8 +3203,8 @@ H5D_chunk_mem_cb(void UNUSED *elem, hid_t UNUSED type_id, unsigned ndims, const
* find the chunk in the skip list.
*/
/* Get the chunk node from the skip list */
- if((chunk_info=H5SL_search(fm->fsel,&chunk_index))==NULL)
- HGOTO_ERROR(H5E_DATASPACE,H5E_NOTFOUND,FAIL,"can't locate chunk in skip list")
+ if(NULL == (chunk_info = (H5D_chunk_info_t *)H5SL_search(fm->fsel, &chunk_index)))
+ HGOTO_ERROR(H5E_DATASPACE, H5E_NOTFOUND, FAIL, "can't locate chunk in skip list")
/* Check if the chunk already has a memory space */
if(chunk_info->mspace==NULL) {
@@ -3334,7 +3334,7 @@ H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
H5P_genplist_t *dx_plist; /* Data transer property list */
/* Get the dataset transfer property list */
- if (NULL == (dx_plist = H5I_object(dxpl_id)))
+ if (NULL == (dx_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list")
/* Change the xfer_mode to independent for handling the I/O */
@@ -3398,7 +3398,7 @@ H5D_ioinfo_term(H5D_io_info_t *io_info)
H5P_genplist_t *dx_plist; /* Data transer property list */
/* Get the dataset transfer property list */
- if (NULL == (dx_plist = H5I_object(io_info->dxpl_id)))
+ if (NULL == (dx_plist = (H5P_genplist_t *)H5I_object(io_info->dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
/* Restore the original parallel I/O mode */
diff --git a/src/H5Distore.c b/src/H5Distore.c
index c10e6bf..1efe049 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -363,19 +363,19 @@ H5D_istore_decode_key(const H5F_t UNUSED *f, const H5B_t *bt, const uint8_t *raw
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_decode_key)
/* check args */
- assert(f);
- assert(bt);
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ HDassert(f);
+ HDassert(bt);
+ shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
- assert(raw);
- assert(key);
+ HDassert(raw);
+ HDassert(key);
ndims = H5D_ISTORE_NDIMS(shared);
- assert(ndims<=H5O_LAYOUT_NDIMS);
+ HDassert(ndims <= H5O_LAYOUT_NDIMS);
/* decode */
UINT32DECODE(raw, key->nbytes);
UINT32DECODE(raw, key->filter_mask);
- for (u=0; u<ndims; u++)
+ for(u = 0; u < ndims; u++)
UINT64DECODE(raw, key->offset[u]);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -405,19 +405,19 @@ H5D_istore_encode_key(const H5F_t UNUSED *f, const H5B_t *bt, uint8_t *raw, void
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_encode_key)
/* check args */
- assert(f);
- assert(bt);
- shared=H5RC_GET_OBJ(bt->rc_shared);
+ HDassert(f);
+ HDassert(bt);
+ shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
- assert(raw);
- assert(key);
+ HDassert(raw);
+ HDassert(key);
ndims = H5D_ISTORE_NDIMS(shared);
- assert(ndims<=H5O_LAYOUT_NDIMS);
+ HDassert(ndims <= H5O_LAYOUT_NDIMS);
/* encode */
UINT32ENCODE(raw, key->nbytes);
UINT32ENCODE(raw, key->filter_mask);
- for (u=0; u<ndims; u++)
+ for(u = 0; u < ndims; u++)
UINT64ENCODE(raw, key->offset[u]);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -1374,7 +1374,7 @@ H5D_istore_flush_entry(const H5D_io_info_t *io_info, H5D_rdcc_ent_t *ent, hbool_
if(buf == ent->chunk)
buf = NULL;
if(ent->chunk != NULL)
- ent->chunk = H5D_istore_chunk_xfree(ent->chunk,&(io_info->dset->shared->dcpl_cache.pline));
+ ent->chunk = (uint8_t *)H5D_istore_chunk_xfree(ent->chunk, &(io_info->dset->shared->dcpl_cache.pline));
} /* end if */
done:
@@ -1390,7 +1390,7 @@ done:
*/
if(ret_value < 0 && point_of_no_return) {
if(ent->chunk)
- ent->chunk = H5D_istore_chunk_xfree(ent->chunk, &(io_info->dset->shared->dcpl_cache.pline));
+ ent->chunk = (uint8_t *)H5D_istore_chunk_xfree(ent->chunk, &(io_info->dset->shared->dcpl_cache.pline));
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
@@ -1427,12 +1427,12 @@ H5D_istore_preempt(const H5D_io_info_t *io_info, H5D_rdcc_ent_t * ent, hbool_t f
/* Flush */
if(H5D_istore_flush_entry(io_info, ent, TRUE) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer")
- }
+ } /* end if */
else {
/* Don't flush, just free chunk */
if(ent->chunk != NULL)
- ent->chunk = H5D_istore_chunk_xfree(ent->chunk,&(io_info->dset->shared->dcpl_cache.pline));
- }
+ ent->chunk = (uint8_t *)H5D_istore_chunk_xfree(ent->chunk, &(io_info->dset->shared->dcpl_cache.pline));
+ } /* end else */
/* Unlink from list */
if(ent->prev)
@@ -1649,13 +1649,13 @@ H5D_istore_shared_free (void *_shared)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_shared_free)
/* Free the raw B-tree node buffer */
- H5FL_BLK_FREE(chunk_page,shared->page);
+ (void)H5FL_BLK_FREE(chunk_page, shared->page);
/* Free the B-tree native key offsets buffer */
- H5FL_SEQ_FREE(size_t,shared->nkey);
+ H5FL_SEQ_FREE(size_t, shared->nkey);
/* Free the shared B-tree info */
- H5FL_FREE(H5B_shared_t,shared);
+ H5FL_FREE(H5B_shared_t, shared);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5D_istore_shared_free() */
@@ -2465,7 +2465,7 @@ HDfprintf(stderr,"%s: mem_offset_arr[%Zu]=%Hu\n",FUNC,*mem_curr_seq,mem_offset_a
H5D_BUILD_IO_INFO(&chk_io_info,dset,io_info->dxpl_cache,io_info->dxpl_id,&chk_store);
/* Do I/O directly on chunk without reading it into the cache */
- if ((ret_value=H5D_contig_writevv(&chk_io_info, chunk_max_nseq, chunk_curr_seq, chunk_len_arr, chunk_offset_arr, mem_max_nseq, mem_curr_seq, mem_len_arr, mem_offset_arr, (haddr_t)0, NULL, buf))<0)
+ if((ret_value = H5D_contig_writevv(&chk_io_info, chunk_max_nseq, chunk_curr_seq, chunk_len_arr, chunk_offset_arr, mem_max_nseq, mem_curr_seq, mem_len_arr, mem_offset_arr, (haddr_t)0, NULL, buf)) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
} /* end if */
else {
@@ -2763,7 +2763,7 @@ H5D_istore_chunk_xfree(void *chk, const H5O_pline_t *pline)
if(pline->nused > 0)
H5MM_xfree(chk);
else
- H5FL_BLK_FREE(chunk, chk);
+ (void)H5FL_BLK_FREE(chunk, chk);
} /* end if */
FUNC_LEAVE_NOAPI(NULL)
@@ -3040,6 +3040,9 @@ H5D_istore_allocate(H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite)
} /* end if */
#endif /* H5_HAVE_PARALLEL */
+ /* Reset any cached chunk info for this dataset */
+ H5D_istore_cinfo_cache_reset(&dset->shared->cache.chunk.last);
+
done:
/* Release the fill buffer info, if it's been initialized */
if(fb_info_init && H5D_fill_term(&fb_info) < 0)
@@ -3546,7 +3549,7 @@ H5D_istore_initialize_by_extent(H5D_io_info_t *io_info)
/* Lock the chunk into the cache, to get a pointer to the chunk buffer */
store.chunk.offset = chunk_offset;
- if(NULL == (chunk = H5D_istore_lock(io_info, NULL, FALSE, &idx_hint)))
+ if(NULL == (chunk = (uint8_t *)H5D_istore_lock(io_info, NULL, FALSE, &idx_hint)))
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to read raw data chunk")
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 5d5f092..c8087bb 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -322,13 +322,13 @@ H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info)
FUNC_ENTER_API(H5Pset_fapl_mpio, FAIL)
H5TRACE3("e", "iMcMi", fapl_id, comm, info);
- if(fapl_id==H5P_DEFAULT)
+ if(fapl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
+ if(NULL == (plist = (H5P_genplist_t *)H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list")
- if (MPI_COMM_NULL == comm)
+ if(MPI_COMM_NULL == comm)
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a valid communicator")
/* Initialize driver specific properties */
@@ -393,11 +393,11 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm/*out*/, MPI_Info *info/*out*/)
FUNC_ENTER_API(H5Pget_fapl_mpio, FAIL)
H5TRACE3("e", "ixx", fapl_id, comm, info);
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
+ if(NULL == (plist = (H5P_genplist_t *)H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list")
- if (H5FD_MPIO!=H5P_get_driver(plist))
+ if(H5FD_MPIO != H5P_get_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
- if (NULL==(fa=H5P_get_driver_info(plist)))
+ if(NULL == (fa = (H5FD_mpio_fapl_t *)H5P_get_driver_info(plist)))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
/* Store the duplicated communicator in a temporary variable for error */
@@ -471,9 +471,9 @@ H5Pset_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
+ if(NULL == (plist = (H5P_genplist_t *)H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
- if (H5FD_MPIO_INDEPENDENT!=xfer_mode && H5FD_MPIO_COLLECTIVE!=xfer_mode)
+ if(H5FD_MPIO_INDEPENDENT != xfer_mode && H5FD_MPIO_COLLECTIVE != xfer_mode)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incorrect xfer_mode")
/* Set the transfer mode */
@@ -517,9 +517,9 @@ H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode/*out*/)
FUNC_ENTER_API(H5Pget_dxpl_mpio, FAIL)
H5TRACE2("e", "ix", dxpl_id, xfer_mode);
- if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
+ if(NULL == (plist = (H5P_genplist_t *)H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
- if (H5FD_MPIO!=H5P_get_driver(plist))
+ if(H5FD_MPIO != H5P_get_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
/* Get the transfer mode */
@@ -563,13 +563,12 @@ H5Pset_dxpl_mpio_collective_opt(hid_t dxpl_id, H5FD_mpio_collective_opt_t opt_mo
FUNC_ENTER_API(H5Pset_dxpl_mpio_collective_opt, FAIL)
H5TRACE2("e", "iDc", dxpl_id, opt_mode);
-/* H5TRACE2("e","iDt",dxpl_id,xfer_mode);*/
- if(dxpl_id==H5P_DEFAULT)
+ if(dxpl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
+ if(NULL == (plist = (H5P_genplist_t *)H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
/* Set the transfer mode */
@@ -616,13 +615,12 @@ H5Pset_dxpl_mpio_chunk_opt(hid_t dxpl_id, H5FD_mpio_chunk_opt_t opt_mode)
FUNC_ENTER_API(H5Pset_dxpl_mpio_chunk_opt, FAIL)
H5TRACE2("e", "iDh", dxpl_id, opt_mode);
-/* H5TRACE2("e","iDt",dxpl_id,xfer_mode);*/
- if(dxpl_id==H5P_DEFAULT)
+ if(dxpl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
+ if(NULL == (plist = (H5P_genplist_t *)H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
/* Set the transfer mode */
@@ -666,11 +664,11 @@ H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_per_proc)
FUNC_ENTER_API(H5Pset_dxpl_mpio_chunk_opt_num, FAIL)
H5TRACE2("e", "iIu", dxpl_id, num_chunk_per_proc);
- if(dxpl_id==H5P_DEFAULT)
+ if(dxpl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
+ if(NULL == (plist = (H5P_genplist_t *)H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
/* Set the transfer mode */
@@ -713,11 +711,11 @@ H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_num_proc_per_ch
FUNC_ENTER_API(H5Pset_dxpl_mpio_chunk_opt_ratio, FAIL)
H5TRACE2("e", "iIu", dxpl_id, percent_num_proc_per_chunk);
- if(dxpl_id==H5P_DEFAULT)
+ if(dxpl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list")
/* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
+ if(NULL == (plist = (H5P_genplist_t *)H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl")
/* Set the transfer mode */
@@ -761,19 +759,18 @@ H5FD_mpio_fapl_get(H5FD_t *_file)
FUNC_ENTER_NOAPI(H5FD_mpio_fapl_get, NULL)
- assert(file);
- assert(H5FD_MPIO==file->pub.driver_id);
+ HDassert(file);
+ HDassert(H5FD_MPIO == file->pub.driver_id);
- if (NULL==(fa=H5MM_calloc(sizeof(H5FD_mpio_fapl_t))))
+ if(NULL == (fa = (H5FD_mpio_fapl_t *)H5MM_calloc(sizeof(H5FD_mpio_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Duplicate communicator and Info object. */
- if (FAIL==H5FD_mpi_comm_info_dup(file->comm, file->info,
- &fa->comm, &fa->info))
+ if(FAIL == H5FD_mpi_comm_info_dup(file->comm, file->info, &fa->comm, &fa->info))
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
/* Set return value */
- ret_value=fa;
+ ret_value = fa;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -809,15 +806,14 @@ if (H5FD_mpio_Debug[(int)'t'])
fprintf(stderr, "enter H5FD_mpio_fapl_copy\n");
#endif
- if (NULL==(new_fa=H5MM_malloc(sizeof(H5FD_mpio_fapl_t))))
+ if(NULL == (new_fa = (H5FD_mpio_fapl_t *)H5MM_malloc(sizeof(H5FD_mpio_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Copy the general information */
HDmemcpy(new_fa, old_fa, sizeof(H5FD_mpio_fapl_t));
/* Duplicate communicator and Info object. */
- if (FAIL==H5FD_mpi_comm_info_dup(old_fa->comm, old_fa->info,
- &new_fa->comm, &new_fa->info))
+ if(FAIL == H5FD_mpi_comm_info_dup(old_fa->comm, old_fa->info, &new_fa->comm, &new_fa->info))
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOPY, NULL, "Communicator/Info duplicate failed")
ret_value = new_fa;
@@ -956,14 +952,14 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
#endif
/* Obtain a pointer to mpio-specific file access properties */
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
+ if(NULL == (plist = (H5P_genplist_t *)H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
- if (H5P_FILE_ACCESS_DEFAULT==fapl_id || H5FD_MPIO!=H5P_get_driver(plist)) {
+ if(H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MPIO != H5P_get_driver(plist)) {
_fa.comm = MPI_COMM_SELF; /*default*/
_fa.info = MPI_INFO_NULL; /*default*/
fa = &_fa;
} else {
- fa = H5P_get_driver_info(plist);
+ fa = (const H5FD_mpio_fapl_t *)H5P_get_driver_info(plist);
assert(fa);
}
@@ -998,7 +994,7 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
#endif
/*OKAY: CAST DISCARDS CONST*/
- if (MPI_SUCCESS != (mpi_code=MPI_File_open(comm_dup, (char*)name, mpi_amode, info_dup, &fh)))
+ if(MPI_SUCCESS != (mpi_code = MPI_File_open(comm_dup, (char*)name, mpi_amode, info_dup, &fh)))
HMPI_GOTO_ERROR(NULL, "MPI_File_open failed", mpi_code)
file_opened=1;
@@ -1009,7 +1005,7 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
HMPI_GOTO_ERROR(NULL, "MPI_Comm_size failed", mpi_code)
/* Build the return value and initialize it */
- if (NULL==(file=H5MM_calloc(sizeof(H5FD_mpio_t))))
+ if(NULL == (file = (H5FD_mpio_t *)H5MM_calloc(sizeof(H5FD_mpio_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
file->f = fh;
file->comm = comm_dup;
@@ -1034,7 +1030,7 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id,
} /* end if */
/* Broadcast file size */
- if (MPI_SUCCESS != (mpi_code=MPI_Bcast(&size, sizeof(MPI_Offset), MPI_BYTE, 0, comm_dup)))
+ if(MPI_SUCCESS != (mpi_code = MPI_Bcast(&size, (int)sizeof(MPI_Offset), MPI_BYTE, 0, comm_dup)))
HMPI_GOTO_ERROR(NULL, "MPI_Bcast failed", mpi_code)
/* Determine if the file should be truncated */
@@ -1454,9 +1450,9 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id, haddr_t add
H5FD_mpio_xfer_t xfer_mode; /* I/O tranfer mode */
/* Obtain the data transfer properties */
- if(NULL == (plist = H5I_object(dxpl_id)))
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
- xfer_mode=(H5FD_mpio_xfer_t)H5P_peek_unsigned(plist, H5D_XFER_IO_XFER_MODE_NAME);
+ xfer_mode = (H5FD_mpio_xfer_t)H5P_peek_unsigned(plist, H5D_XFER_IO_XFER_MODE_NAME);
/*
* Set up for a fancy xfer using complex types, or single byte block. We
@@ -1499,10 +1495,10 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id, haddr_t add
fprintf(stdout, "H5FD_mpio_read: using MPIO collective mode\n");
#endif
/* Peek the collective_opt property to check whether the application wants to do IO individually. */
- coll_opt_mode=(H5FD_mpio_collective_opt_t)H5P_peek_unsigned(plist,H5D_XFER_MPIO_COLLECTIVE_OPT_NAME);
+ coll_opt_mode = (H5FD_mpio_collective_opt_t)H5P_peek_unsigned(plist, H5D_XFER_MPIO_COLLECTIVE_OPT_NAME);
/* Peek the xfer_opt_mode property to check whether the application wants to do IO individually. */
- xfer_opt_mode=(H5FD_mpio_collective_opt_t)H5P_peek_unsigned(plist,H5D_XFER_IO_XFER_OPT_MODE_NAME);
+ xfer_opt_mode = (H5FD_mpio_collective_opt_t)H5P_peek_unsigned(plist, H5D_XFER_IO_XFER_OPT_MODE_NAME);
if(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO && xfer_opt_mode == H5FD_MPIO_COLLECTIVE_IO) {
#ifdef H5FDmpio_DEBUG
@@ -1528,10 +1524,10 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id, haddr_t add
* Reset the file view when we used MPI derived types
*/
/*OKAY: CAST DISCARDS CONST QUALIFIER*/
- if (MPI_SUCCESS != (mpi_code=MPI_File_set_view(file->f, 0, MPI_BYTE, MPI_BYTE, H5FD_mpi_native_g, file->info)))
+ if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(file->f, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, H5FD_mpi_native_g, file->info)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
} else {
- if (MPI_SUCCESS!= (mpi_code=MPI_File_read_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
+ if(MPI_SUCCESS != (mpi_code = MPI_File_read_at(file->f, mpi_off, buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_read_at failed", mpi_code)
}
@@ -1738,7 +1734,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
#endif
/* Obtain the data transfer properties */
- if(NULL == (plist = H5I_object(dxpl_id)))
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
if(type==H5FD_MEM_DRAW) {
@@ -1830,15 +1826,12 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
fprintf(stdout, "H5FD_mpio_write: using MPIO collective mode\n");
#endif
/* Peek the collective_opt property to check whether the application wants to do IO individually. */
- coll_opt_mode=(H5FD_mpio_collective_opt_t)H5P_peek_unsigned(plist,H5D_XFER_MPIO_COLLECTIVE_OPT_NAME);
+ coll_opt_mode = (H5FD_mpio_collective_opt_t)H5P_peek_unsigned(plist,H5D_XFER_MPIO_COLLECTIVE_OPT_NAME);
/* Peek the xfer_opt_mode property to check whether the application wants to do IO individually. */
- xfer_opt_mode=(H5FD_mpio_collective_opt_t)H5P_peek_unsigned(plist,H5D_XFER_IO_XFER_OPT_MODE_NAME);
-
-
+ xfer_opt_mode = (H5FD_mpio_collective_opt_t)H5P_peek_unsigned(plist,H5D_XFER_IO_XFER_OPT_MODE_NAME);
/*OKAY: CAST DISCARDS CONST QUALIFIER*/
-
if(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO && xfer_opt_mode == H5FD_MPIO_COLLECTIVE_IO ) {
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])
@@ -1865,11 +1858,11 @@ if (MPI_SUCCESS != (mpi_code=MPI_File_write_at_all(file->f, mpi_off, (void*)buf,
* Reset the file view when we used MPI derived types
*/
/*OKAY: CAST DISCARDS CONST QUALIFIER*/
- if (MPI_SUCCESS != (mpi_code=MPI_File_set_view(file->f, 0, MPI_BYTE, MPI_BYTE, H5FD_mpi_native_g, file->info)))
+ if(MPI_SUCCESS != (mpi_code = MPI_File_set_view(file->f, (MPI_Offset)0, MPI_BYTE, MPI_BYTE, H5FD_mpi_native_g, file->info)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_set_view failed", mpi_code)
} else {
/*OKAY: CAST DISCARDS CONST QUALIFIER*/
- if (MPI_SUCCESS != (mpi_code=MPI_File_write_at(file->f, mpi_off, (void*)buf, size_i, buf_type, &mpi_stat)))
+ if(MPI_SUCCESS != (mpi_code = MPI_File_write_at(file->f, mpi_off, (void*)buf, size_i, buf_type, &mpi_stat)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at failed", mpi_code)
}
@@ -1908,8 +1901,8 @@ done:
/* if only one process writes, need to broadcast the ret_value to
* other processes
*/
- if (type!=H5FD_MEM_DRAW) {
- if (MPI_SUCCESS != (mpi_code=MPI_Bcast(&ret_value, sizeof(ret_value), MPI_BYTE, H5_PAR_META_WRITE, file->comm)))
+ if(type != H5FD_MEM_DRAW) {
+ if(MPI_SUCCESS != (mpi_code = MPI_Bcast(&ret_value, (int)sizeof(ret_value), MPI_BYTE, H5_PAR_META_WRITE, file->comm)))
HMPI_DONE_ERROR(FAIL, "MPI_Bcast failed", mpi_code)
} /* end if */
#endif /* JRM */