summaryrefslogtreecommitdiffstats
path: root/src/H5Dio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r--src/H5Dio.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index b7c7219..ce75021 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -515,6 +515,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
H5S_conv_t *sconv=NULL; /*space conversion funcs*/
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t xfer_mode; /*xfer_mode for this request */
+ hbool_t use_par_opt_io=FALSE; /* Whether the 'optimized' I/O routines with be parallel */
hbool_t xfer_mode_changed=FALSE; /* Whether the transfer mode was changed */
#endif /*H5_HAVE_PARALLEL*/
H5P_genplist_t *dx_plist=NULL; /* Data transfer property list */
@@ -637,11 +638,13 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
} /* end switch */
/* Get dataspace functions */
- if (NULL==(sconv=H5S_find(mem_space, file_space, sconv_flags)))
+ if (NULL==(sconv=H5S_find(mem_space, file_space, sconv_flags, &use_par_opt_io)))
HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert from file to memory data space");
#ifdef H5_HAVE_PARALLEL
- H5D_io_assist_mpio(dx_plist, xfer_mode, &xfer_mode_changed);
+ /* 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(dx_plist, xfer_mode, &xfer_mode_changed);
#endif /*H5_HAVE_PARALLEL*/
/* Determine correct I/O routine to invoke */
@@ -733,6 +736,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
H5S_conv_t *sconv=NULL; /*space conversion funcs*/
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t xfer_mode; /*xfer_mode for this request */
+ hbool_t use_par_opt_io=FALSE; /* Whether the 'optimized' I/O routines with be parallel */
hbool_t xfer_mode_changed=FALSE; /* Whether the transfer mode was changed */
#endif /*H5_HAVE_PARALLEL*/
H5P_genplist_t *dx_plist=NULL; /* Data transfer property list */
@@ -854,11 +858,13 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
} /* end switch */
/* Get dataspace functions */
- if (NULL==(sconv=H5S_find(mem_space, file_space, sconv_flags)))
+ if (NULL==(sconv=H5S_find(mem_space, file_space, sconv_flags, &use_par_opt_io)))
HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert from memory to file data space");
#ifdef H5_HAVE_PARALLEL
- H5D_io_assist_mpio(dx_plist, xfer_mode, &xfer_mode_changed);
+ /* 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(dx_plist, xfer_mode, &xfer_mode_changed);
#endif /*H5_HAVE_PARALLEL*/
/* Determine correct I/O routine to invoke */