summaryrefslogtreecommitdiffstats
path: root/src/H5FD.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2000-11-21 20:55:48 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2000-11-21 20:55:48 (GMT)
commit91da899a1fb90400aa4f6afe9953c0be0fc621b8 (patch)
treea5f0a206dccd9b6a07c37e8c022899dd6abeb4f0 /src/H5FD.c
parentb9c8954ad9954dea8b6dddbd52559a4c70ccdfcc (diff)
downloadhdf5-91da899a1fb90400aa4f6afe9953c0be0fc621b8.zip
hdf5-91da899a1fb90400aa4f6afe9953c0be0fc621b8.tar.gz
hdf5-91da899a1fb90400aa4f6afe9953c0be0fc621b8.tar.bz2
[svn-r2990] Purpose:
Bug fix (feature, kind of) Description: The library used to hang if a collective dataset read/write request does not have the same number of eventual MPIO request. Part of the reason is that H5FD_read/H5FD_write immediately returns succeess if it sees the request size is 0. This caused problem since other processes with I/O to do would be hanging by waiting for the early returned process(es). Solution: H5FD.c: disable the early return code in parallel mode. Make it go on even with "nothing" to transfer. H5D.c: the optimized MPIO xfer routines can handle collect calls correctly when the condition is right (e.g., no conversion). When the COLLECTIVE request cannot be handled correctly without the risk of hanging, the COLLECTIVE is changed to INDEPENDENT calls for the eventual MPIO calls. Platforms tested: IRIX64 parallel (-64, n32), IRIX64 -64 sequential, Linux sequential.
Diffstat (limited to 'src/H5FD.c')
-rw-r--r--src/H5FD.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/H5FD.c b/src/H5FD.c
index aea02c2..8435963 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -1852,6 +1852,10 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t siz
* Wednesday, August 4, 1999
*
* Modifications:
+ * Albert Cheng, 2000-11-21
+ * Disable the code that does early return when size==0 for
+ * Parallel mode since a collective call would require the process
+ * to continue on with "nothing" to transfer.
*
*-------------------------------------------------------------------------
*/
@@ -1865,8 +1869,12 @@ H5FD_read(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t si
(H5P_DATA_XFER==H5P_get_class(dxpl_id) || H5I_object(dxpl_id)));
assert(buf);
+#ifndef H5_HAVE_PARALLEL
+ /* Do not return early for Parallel mode since the I/O could be a */
+ /* collective transfer. */
/* The no-op case */
if (0==size) HRETURN(SUCCEED);
+#endif
/* Check if this information is in the metadata accumulator */
if((file->feature_flags&H5FD_FEAT_ACCUMULATE_METADATA) &&
@@ -2001,6 +2009,10 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t si
* Wednesday, August 4, 1999
*
* Modifications:
+ * Albert Cheng, 2000-11-21
+ * Disable the code that does early return when size==0 for
+ * Parallel mode since a collective call would require the process
+ * to continue on with "nothing" to transfer.
*
*-------------------------------------------------------------------------
*/
@@ -2017,8 +2029,12 @@ H5FD_write(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t s
(H5P_DATA_XFER==H5P_get_class(dxpl_id) && H5I_object(dxpl_id)));
assert(buf);
+#ifndef H5_HAVE_PARALLEL
+ /* Do not return early for Parallel mode since the I/O could be a */
+ /* collective transfer. */
/* The no-op case */
if (0==size) HRETURN(SUCCEED);
+#endif
/* Check for accumulating metadata */
if((file->feature_flags&H5FD_FEAT_ACCUMULATE_METADATA) && type!=H5FD_MEM_DRAW) {