summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5Dio.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 1c00c79..9a1403f 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -639,6 +639,8 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
hbool_t use_par_opt_io=FALSE; /* Whether the 'optimized' I/O routines with be parallel */
#ifdef H5_HAVE_PARALLEL
hbool_t xfer_mode_changed=FALSE; /* Whether the transfer mode was changed */
+ int prop_value,new_value;
+ htri_t check_prop;
#endif /*H5_HAVE_PARALLEL*/
H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
H5D_dxpl_cache_t *dxpl_cache=&_dxpl_cache; /* Data transfer property cache */
@@ -749,6 +751,26 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert from file to memory data space")
#ifdef H5_HAVE_PARALLEL
+ /**** Test for collective chunk IO
+ notice the following code should be removed after
+ a more general collective chunk IO algorithm is applied.
+ */
+
+ if(dataset->layout.type == H5D_CHUNKED) { /*only check for chunking storage */
+ check_prop = H5Pexist(dxpl_id,"__test__ccfoo___");
+ if(check_prop < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to check property list");
+ if(check_prop > 0) {
+ if(H5Pget(dxpl_id,"__test__ccfoo___",&prop_value)<0)
+ HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to get property value");
+ if(!use_par_opt_io) {
+ new_value = 0;
+ if(H5Pset(dxpl_id,"__test__ccfoo___",&new_value)<0)
+ HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to set property value");
+ }
+ }
+ }
+ /* end Test for collective chunk IO */
/* Don't reset the transfer mode if we can't or won't use it */
if(!use_par_opt_io || !H5T_path_noop(tpath))
H5D_io_assist_mpio(dxpl_id, dxpl_cache, &xfer_mode_changed);
@@ -835,6 +857,8 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
hbool_t use_par_opt_io=FALSE; /* Whether the 'optimized' I/O routines with be parallel */
#ifdef H5_HAVE_PARALLEL
hbool_t xfer_mode_changed=FALSE; /* Whether the transfer mode was changed */
+ int prop_value,new_value;
+ htri_t check_prop;
#endif /*H5_HAVE_PARALLEL*/
H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
H5D_dxpl_cache_t *dxpl_cache=&_dxpl_cache; /* Data transfer property cache */
@@ -965,6 +989,28 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert from memory to file data space")
#ifdef H5_HAVE_PARALLEL
+ /**** Test for collective chunk IO
+ notice the following code should be removed after
+ a more general collective chunk IO algorithm is applied.
+ */
+
+ if(dataset->layout.type == H5D_CHUNKED) { /*only check for chunking storage */
+
+ check_prop = H5Pexist(dxpl_id,"__test__ccfoo___");
+ if(check_prop < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to check property list");
+ if(check_prop > 0) {
+ if(H5Pget(dxpl_id,"__test__ccfoo___",&prop_value)<0)
+ HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to get property value");
+ if(!use_par_opt_io) {
+ new_value = 0;
+ if(H5Pset(dxpl_id,"__test__ccfoo___",&new_value)<0)
+ HGOTO_ERROR(H5E_PLIST, H5E_UNSUPPORTED, FAIL, "unable to set property value");
+ }
+ }
+ }
+
+ /* end Test for collective chunk IO */
/* Don't reset the transfer mode if we can't or won't use it */
if(!use_par_opt_io || !H5T_path_noop(tpath))
H5D_io_assist_mpio(dxpl_id, dxpl_cache, &xfer_mode_changed);