summaryrefslogtreecommitdiffstats
path: root/src/H5P.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1998-04-17 14:52:41 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1998-04-17 14:52:41 (GMT)
commitd6923f46e0f0969aa0b73eb2c525dc8bf65e610c (patch)
tree691107678c0856aac60da073885814f3a672a340 /src/H5P.c
parent4d16aa5ab78589e0e09dcd3072a06b3681bf7d54 (diff)
downloadhdf5-d6923f46e0f0969aa0b73eb2c525dc8bf65e610c.zip
hdf5-d6923f46e0f0969aa0b73eb2c525dc8bf65e610c.tar.gz
hdf5-d6923f46e0f0969aa0b73eb2c525dc8bf65e610c.tar.bz2
[svn-r351] Removed the access_mode argument from H5Pset_mpi which was later
used to open an HDF5 file with MPIO access. The design has changed to provide access-mode controll (independent or collective access) as an argument in the H5D read/write calls. Also removed the macros H5FACC_INDEPENDENT and H5FACC_COLLECTIVE. The original thinking was to define how a file is independent or collective access. They are replaced by the enum H5D_transfer_t with values of H5D_XFER_INDEPENDENT and H5D_XFER_COLLECTIVE. These values are used in the H5Pset_xfer to setup a data transfer property list to be used during the H5D read/write calls. The original access_mode field in the File access structure is still there. It would be removed soon once the transfer control can be passed down to the low level I/O routines.
Diffstat (limited to 'src/H5P.c')
-rw-r--r--src/H5P.c51
1 files changed, 15 insertions, 36 deletions
diff --git a/src/H5P.c b/src/H5P.c
index 9f29da3..2d0e6f0 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -1902,10 +1902,15 @@ H5Pget_preserve (hid_t plist_id)
* mpi-related stuff is in the `u.mpi' member. The `access_mode' will
* contain only mpi-related flags defined in H5Fpublic.h.
*
+ * Albert Cheng, Apr 16, 1998
+ * Removed the access_mode argument. The access_mode is changed
+ * to be controlled by data transfer property list during data
+ * read/write calls.
+ *
*-------------------------------------------------------------------------
*/
herr_t
-H5Pset_mpi (hid_t tid, MPI_Comm comm, MPI_Info info, unsigned access_mode)
+H5Pset_mpi (hid_t tid, MPI_Comm comm, MPI_Info info)
{
H5F_access_t *tmpl = NULL;
MPI_Comm lcomm;
@@ -1920,43 +1925,15 @@ H5Pset_mpi (hid_t tid, MPI_Comm comm, MPI_Info info, unsigned access_mode)
"not a file access template");
}
- switch (access_mode){
- case H5ACC_INDEPENDENT:
- case H5ACC_COLLECTIVE:
- /* okay */
- break;
-
- default:
- HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,
- "invalid mpio access mode");
- }
-
#ifdef LATER
/*
* Need to verify comm and info contain sensible information.
*/
#endif
-
- /*
- * Everything looks good. Now go ahead and modify the access template.
- */
tmpl->driver = H5F_LOW_MPIO;
- tmpl->u.mpio.access_mode = access_mode;
-
- /*
- * Store a duplicate copy of comm so that user may freely modify comm
- * after this call.
- */
- if ((mrc = MPI_Comm_dup(comm, &lcomm)) != MPI_SUCCESS) {
- HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "failure to duplicate communicator");
- }
+ tmpl->u.mpio.access_mode = H5D_XFER_INDEPENDENT;
tmpl->u.mpio.comm = comm;
-
-#ifdef LATER
- /* Need to duplicate info too but don't know a quick way to do it now */
-#endif
tmpl->u.mpio.info = info;
FUNC_LEAVE(SUCCEED);
@@ -1982,10 +1959,15 @@ H5Pset_mpi (hid_t tid, MPI_Comm comm, MPI_Info info, unsigned access_mode)
*
* Modifications:
*
+ * Albert Cheng, Apr 16, 1998
+ * Removed the access_mode argument. The access_mode is changed
+ * to be controlled by data transfer property list during data
+ * read/write calls.
+ *
*-------------------------------------------------------------------------
*/
herr_t
-H5Pget_mpi (hid_t tid, MPI_Comm *comm, MPI_Info *info, unsigned *access_mode)
+H5Pget_mpi (hid_t tid, MPI_Comm *comm, MPI_Info *info)
{
H5F_access_t *tmpl = NULL;
@@ -2001,11 +1983,8 @@ H5Pget_mpi (hid_t tid, MPI_Comm *comm, MPI_Info *info, unsigned *access_mode)
HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,
"the mpi driver is not set");
}
-
-#ifndef LATER
- HRETURN_ERROR (H5E_IO, H5E_UNSUPPORTED, FAIL,
- "not implemented yet");
-#endif
+ *comm = tmpl->u.mpio.comm;
+ *info = tmpl->u.mpio.info;
FUNC_LEAVE (SUCCEED);
}