summaryrefslogtreecommitdiffstats
path: root/src/H5FDmpio.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-12-29 19:34:11 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-12-29 19:34:11 (GMT)
commit5db6c61f18198ac4477a6ba99d405ff82cf467a7 (patch)
tree4cf9ef4d947830f28f12d110148c3bfea6ff49e9 /src/H5FDmpio.c
parentb6fd9f9d760dbe4e6ab530b12e0672088570224a (diff)
downloadhdf5-5db6c61f18198ac4477a6ba99d405ff82cf467a7.zip
hdf5-5db6c61f18198ac4477a6ba99d405ff82cf467a7.tar.gz
hdf5-5db6c61f18198ac4477a6ba99d405ff82cf467a7.tar.bz2
[svn-r7993] Purpose:
Code cleanup, bug fixes Description: Wrap up rest of changes necessary for fixing the "short" MPI-I/O read problem that Robb reported. Platforms tested: FreeBSD 4.9 (sleipnir) too minor to require h5committest
Diffstat (limited to 'src/H5FDmpio.c')
-rw-r--r--src/H5FDmpio.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 1b0f461..61d97da 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -40,8 +40,7 @@
/*
* The driver identification number, initialized at runtime if H5_HAVE_PARALLEL
* is defined. This allows applications to still have the H5FD_MPIO
- * "constants" in their source code (it also makes this file strictly ANSI
- * compliant when H5_HAVE_PARALLEL isn't defined)
+ * "constants" in their source code.
*/
static hid_t H5FD_MPIO_g = 0;
@@ -1323,6 +1322,10 @@ done:
* to HADDR_UNDEF which is the error return value of this
* function.
*
+ * Keeping the EOF updated (during write calls) is expensive
+ * because any process may extend the physical end of the
+ * file. -QAK
+ *
* Return: Success: The end-of-address marker.
*
* Failure: HADDR_UNDEF
@@ -1563,7 +1566,9 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id, haddr_t add
/* How many bytes were actually read? */
/* [This works because the "basic elements" we use for all our MPI derived
- * types are MPI_BYTE - QAK]
+ * types are MPI_BYTE. We should be using the 'buf_type' for the MPI
+ * datatype in this call though... (We aren't because using it causes
+ * the LANL "qsc" machine to dump core - 12/19/03) - QAK]
*/
if (MPI_SUCCESS != (mpi_code=MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_read)))
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
@@ -1879,7 +1884,9 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
/* How many bytes were actually written? */
/* [This works because the "basic elements" we use for all our MPI derived
- * types are MPI_BYTE - QAK]
+ * types are MPI_BYTE. We should be using the 'buf_type' for the MPI
+ * datatype in this call though... (We aren't because using it causes
+ * the LANL "qsc" machine to dump core - 12/19/03) - QAK]
*/
if (MPI_SUCCESS != (mpi_code=MPI_Get_elements(&mpi_stat, MPI_BYTE, &bytes_written)))
HMPI_GOTO_ERROR(FAIL, "MPI_Get_elements failed", mpi_code)
@@ -1903,7 +1910,7 @@ done:
/* if only p<round> writes, need to broadcast the ret_value to other processes */
if ((type!=H5FD_MEM_DRAW) && H5_mpi_1_metawrite_g) {
if (MPI_SUCCESS != (mpi_code=MPI_Bcast(&ret_value, sizeof(ret_value), MPI_BYTE, H5_PAR_META_WRITE, file->comm)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Bcast failed", mpi_code)
+ HMPI_DONE_ERROR(FAIL, "MPI_Bcast failed", mpi_code)
} /* end if */
#endif /* OLD_METADATA_WRITE */
@@ -1912,6 +1919,7 @@ done:
fprintf(stdout, "proc %d: Leaving H5FD_mpio_write with ret_value=%d\n",
file->mpi_rank, ret_value );
#endif
+
FUNC_LEAVE_NOAPI(ret_value)
}