summaryrefslogtreecommitdiffstats
path: root/src/H5FDmpi.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-05-18 14:51:41 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-05-18 14:51:41 (GMT)
commit886039ab68cf0c9a3242fb96676c815141571d38 (patch)
treee5afdded132497dd0f439beb5bc7b46ded5a155c /src/H5FDmpi.c
parent7aaa1ad2297b8e109cbff503be0cc4e73ada0871 (diff)
downloadhdf5-886039ab68cf0c9a3242fb96676c815141571d38.zip
hdf5-886039ab68cf0c9a3242fb96676c815141571d38.tar.gz
hdf5-886039ab68cf0c9a3242fb96676c815141571d38.tar.bz2
[svn-r22377] make the file and memory MPI datatypes as default properties in the
DXPL so that we don't have to insert and remove them everytime we perform collective I/O. Test with h5committest
Diffstat (limited to 'src/H5FDmpi.c')
-rw-r--r--src/H5FDmpi.c51
1 files changed, 4 insertions, 47 deletions
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index ff2c87d..46e7ade 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -466,7 +466,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype btype, MPI_Datatype ftype)
+H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype *btype, MPI_Datatype *ftype)
{
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
@@ -478,56 +478,13 @@ H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype btype, MPI_Datatype ftype)
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dataset transfer list")
/* Set buffer MPI type */
- if(H5P_insert(plist,H5FD_MPI_XFER_MEM_MPI_TYPE_NAME,H5FD_MPI_XFER_MEM_MPI_TYPE_SIZE,&btype,NULL,NULL,NULL,NULL,NULL,NULL)<0)
+ if(H5P_set(plist, H5FD_MPI_XFER_MEM_MPI_TYPE_NAME, btype) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert MPI-I/O property")
- /* Set file MPI type */
- if(H5P_insert(plist,H5FD_MPI_XFER_FILE_MPI_TYPE_NAME,H5FD_MPI_XFER_FILE_MPI_TYPE_SIZE,&ftype,NULL,NULL,NULL,NULL,NULL,NULL)<0)
+ /* Set File MPI type */
+ if(H5P_set(plist, H5FD_MPI_XFER_FILE_MPI_TYPE_NAME, ftype) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't insert MPI-I/O property")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_mpi_setup_collective() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_mpi_teardown_collective
- *
- * Purpose: Remove the temporary MPI-I/O properties from dxpl.
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * Monday, June 17, 2002
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5FD_mpi_teardown_collective(hid_t dxpl_id)
-{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(FAIL)
-
- /* Check arguments */
- if(NULL == (plist = H5P_object_verify(dxpl_id,H5P_DATASET_XFER)))
- HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dataset transfer list")
-
- /* Remove buffer MPI type */
- if(H5P_remove(dxpl_id,plist,H5FD_MPI_XFER_MEM_MPI_TYPE_NAME)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "can't remove MPI-I/O property")
-
- /* Remove file MPI type */
- if(H5P_remove(dxpl_id,plist,H5FD_MPI_XFER_FILE_MPI_TYPE_NAME)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "can't remove MPI-I/O property")
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_mpi_teardown_collective() */
-
-#endif /* H5_HAVE_PARALLEL */
-