summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-06-24 22:06:49 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-06-24 22:06:49 (GMT)
commit341aff1f14c3108dc0a60cb2d54919b4568cbd32 (patch)
treefab08fc8a94063e366dfe2e75592889490ddb931 /src
parent764af9db5c6a97903abbe37e33216629dac9afcd (diff)
downloadhdf5-341aff1f14c3108dc0a60cb2d54919b4568cbd32.zip
hdf5-341aff1f14c3108dc0a60cb2d54919b4568cbd32.tar.gz
hdf5-341aff1f14c3108dc0a60cb2d54919b4568cbd32.tar.bz2
[svn-r25356] set array layout in IOD when properties are given.
Diffstat (limited to 'src')
-rw-r--r--src/H5FF.c1
-rw-r--r--src/H5VLiod_analysis.c3
-rw-r--r--src/H5VLiod_dset.c47
-rw-r--r--src/H5VLiod_group.c3
-rw-r--r--src/H5VLiod_view.c4
5 files changed, 50 insertions, 8 deletions
diff --git a/src/H5FF.c b/src/H5FF.c
index e560914..00c16ba 100644
--- a/src/H5FF.c
+++ b/src/H5FF.c
@@ -4856,7 +4856,6 @@ H5VLiod_get_file_id(const char *filename, iod_handle_t coh, hid_t fapl_id, hid_t
if(ret < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't free container transaction status object");
- fprintf(stderr, "HDF5 container at version %d\n", (int)rtid);
ret = iod_trans_start(coh, &rtid, NULL, 0, IOD_TRANS_R, NULL);
if(ret < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't start transaction");
diff --git a/src/H5VLiod_analysis.c b/src/H5VLiod_analysis.c
index a3130f0..46fd560 100644
--- a/src/H5VLiod_analysis.c
+++ b/src/H5VLiod_analysis.c
@@ -194,6 +194,7 @@ H5VL_iod_server_analysis_invoke_cb(AXE_engine_t UNUSED axe_engine,
#if H5_EFF_DEBUG
print_iod_obj_map(obj_map);
#endif
+ print_iod_obj_map(obj_map);
assert(obj_map->type == IOD_OBJ_ARRAY);
if(H5VL__iod_farm_work(obj_map, cohs, dset_id, region, rtid,
@@ -1506,7 +1507,9 @@ H5VL_iod_server_container_open(hg_handle_t handle)
con_open_hint->hint[0].key = "iod_hint_co_scratch_cksum";
/* open the container */
+#if H5_EFF_DEBUG
printf("Calling iod_container_open on %s\n", file_name);
+#endif
if(iod_container_open(file_name, con_open_hint, IOD_CONT_R, &coh, NULL))
HGOTO_ERROR_FF(FAIL, "can't open file");
diff --git a/src/H5VLiod_dset.c b/src/H5VLiod_dset.c
index c6c574a..990b12a 100644
--- a/src/H5VLiod_dset.c
+++ b/src/H5VLiod_dset.c
@@ -260,6 +260,53 @@ H5VL_iod_server_dset_create_cb(AXE_engine_t UNUSED axe_engine,
step ++;
+ {
+ H5FF_dset_dim_layout_t dims_layout;
+ size_t stripe_count;
+ size_t stripe_size;
+ iod_dims_seq_t dims_seq = NULL;
+ hbool_t non_def = FALSE;
+ uint32_t i;
+ iod_layout_t iod_layout;
+
+ if(H5Pget_dcpl_dim_layout(dcpl_id, &dims_layout) < 0)
+ HGOTO_ERROR_FF(FAIL, "can't get dcpl layout property");
+
+ if(H5D_COL_MAJOR == dims_layout) {
+ non_def = TRUE;
+ if(NULL == (dims_seq = malloc (sizeof(uint32_t) * array.num_dims)))
+ HGOTO_ERROR_FF(FAIL, "can't allocate memory");
+ for(i=0 ; i<array.num_dims ; i++)
+ dims_seq[i] = array.num_dims - (i+1);
+ }
+
+ if(H5Pget_dcpl_stripe_count(dcpl_id, &stripe_count) < 0)
+ HGOTO_ERROR_FF(FAIL, "can't get dcpl stripe count property");
+
+ if(H5Pget_dcpl_stripe_size(dcpl_id, &stripe_size) < 0)
+ HGOTO_ERROR_FF(FAIL, "can't get dcpl stripe size property");
+
+ if(0!=stripe_count || 0!=stripe_size)
+ non_def = TRUE;
+
+ if(TRUE == non_def) {
+ iod_layout.loc = IOD_LOC_CENTRAL;
+ iod_layout.type = IOD_LAYOUT_STRIPED;
+ iod_layout.target_num = (uint32_t)stripe_count;
+ iod_layout.stripe_size = stripe_size;
+ iod_layout.dims_seq = dims_seq;
+
+ ret = iod_obj_set_layout(dset_oh.wr_oh, wtid, NULL, &iod_layout, NULL);
+ if(ret < 0)
+ HGOTO_ERROR_FF(ret, "can't set IOD array layout");
+ }
+
+ if(dims_seq) {
+ free(dims_seq);
+ dims_seq = NULL;
+ }
+ }
+
/* create the attribute KV object for the dataset */
ret = iod_obj_create(coh, wtid, md_obj_create_hint, IOD_OBJ_KV, NULL, NULL, &attrkv_id, NULL);
if(ret < 0)
diff --git a/src/H5VLiod_group.c b/src/H5VLiod_group.c
index 1be384d..420a318 100644
--- a/src/H5VLiod_group.c
+++ b/src/H5VLiod_group.c
@@ -193,9 +193,6 @@ H5VL_iod_server_group_create_cb(AXE_engine_t UNUSED axe_engine,
output.iod_oh.wr_oh.cookie = grp_oh.wr_oh.cookie;
HG_Handler_start_output(op_data->hg_handle, &output);
- fprintf(stderr, "Created group RD_OH %"PRIu64" WR_OH %"PRIu64"\n",
- grp_oh.rd_oh.cookie, grp_oh.wr_oh.cookie);
-
done:
/* close parent group if it is not the location we started the
diff --git a/src/H5VLiod_view.c b/src/H5VLiod_view.c
index ed3b4ea..7472d24 100644
--- a/src/H5VLiod_view.c
+++ b/src/H5VLiod_view.c
@@ -565,8 +565,6 @@ H5VL__iod_apply_query(hid_t file_id, hid_t rcxt_id, hid_t qid, hid_t vcpl_id,
/* combine result1 and result2 */
if(H5Q_COMBINE_AND == comb_type) {
- fprintf(stderr, "ANDing %d and %d\n", result1, result2);
-
*result = result1 + result2;
if(sid1!=FAIL && sid2!=FAIL) {
@@ -580,8 +578,6 @@ H5VL__iod_apply_query(hid_t file_id, hid_t rcxt_id, hid_t qid, hid_t vcpl_id,
*region = H5Scopy(sid2);
}
else if(H5Q_COMBINE_OR == comb_type) {
- fprintf(stderr, "ORing %d and %d\n", result1, result2);
-
*result = result1 + result2 + 1;
if(sid1!=FAIL && sid2!=FAIL) {