summaryrefslogtreecommitdiffstats
path: root/src/H5Dio.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-10-27 21:38:27 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-10-27 21:38:27 (GMT)
commit8a43391a1157aa6bccb530cb1a39e6ad5e0e01e2 (patch)
tree6a803fcfb644aed148738c6d97b54cb287fce421 /src/H5Dio.c
parent8dc1c9870a39b5e8ecb5f313661e27af60511fe3 (diff)
downloadhdf5-8a43391a1157aa6bccb530cb1a39e6ad5e0e01e2.zip
hdf5-8a43391a1157aa6bccb530cb1a39e6ad5e0e01e2.tar.gz
hdf5-8a43391a1157aa6bccb530cb1a39e6ad5e0e01e2.tar.bz2
[svn-r7754] Purpose:
Code cleanup Description: Straighten out more goofiness in the MPI code dealing with collective I/O transfers - mostly make certain that a view is set if-and-only-if collective I/O is occurring on raw data (and vice versa for views and independent I/O) Platforms tested: FreeBSD 4.9 (sleipnir) w/parallel & FPHDF5 too minor to repquire h5committest
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 0fcc7ea..12d4dec 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 */
@@ -737,6 +740,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 */
@@ -857,11 +861,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 */