summaryrefslogtreecommitdiffstats
path: root/src/H5Pdxpl.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-05-18 15:34:28 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-05-18 15:34:28 (GMT)
commit674f45036710a7bf230ca3dae86aa9ca37ff9ed1 (patch)
tree00e6d009398af054454608d96f2ab9c740043cb6 /src/H5Pdxpl.c
parentca8d4218d2a7b888e04bd40c22cc090fb7cd207d (diff)
downloadhdf5-674f45036710a7bf230ca3dae86aa9ca37ff9ed1.zip
hdf5-674f45036710a7bf230ca3dae86aa9ca37ff9ed1.tar.gz
hdf5-674f45036710a7bf230ca3dae86aa9ca37ff9ed1.tar.bz2
[svn-r22379] 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.
Diffstat (limited to 'src/H5Pdxpl.c')
-rw-r--r--src/H5Pdxpl.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index e9b443b..1bdee97 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -120,7 +120,12 @@
#define H5D_XFER_XFORM_DEL H5P_dxfr_xform_del
#define H5D_XFER_XFORM_COPY H5P_dxfr_xform_copy
#define H5D_XFER_XFORM_CLOSE H5P_dxfr_xform_close
-
+/* Definitions for memory MPI type property */
+#define H5FD_MPI_XFER_MEM_MPI_TYPE_SIZE sizeof(MPI_Datatype)
+#define H5FD_MPI_XFER_MEM_MPI_TYPE_DEF MPI_DATATYPE_NULL
+/* Definitions for file MPI type property */
+#define H5FD_MPI_XFER_FILE_MPI_TYPE_SIZE sizeof(MPI_Datatype)
+#define H5FD_MPI_XFER_FILE_MPI_TYPE_DEF MPI_DATATYPE_NULL
/******************/
/* Local Typedefs */
@@ -208,6 +213,8 @@ H5P_dxfr_reg_prop(H5P_genclass_t *pclass)
unsigned def_mpio_chunk_opt_ratio = H5D_XFER_MPIO_CHUNK_OPT_RATIO_DEF;
H5D_mpio_actual_chunk_opt_mode_t def_mpio_actual_chunk_opt_mode = H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_DEF;
H5D_mpio_actual_io_mode_t def_mpio_actual_io_mode = H5D_MPIO_ACTUAL_IO_MODE_DEF;
+ MPI_Datatype btype = H5FD_MPI_XFER_MEM_MPI_TYPE_DEF; /* Default value for MPI buffer type */
+ MPI_Datatype ftype = H5FD_MPI_XFER_FILE_MPI_TYPE_DEF; /* Default value for MPI file type */
#endif /* H5_HAVE_PARALLEL */
H5Z_EDC_t enable_edc = H5D_XFER_EDC_DEF; /* Default value for EDC property */
H5Z_cb_t filter_cb = H5D_XFER_FILTER_CB_DEF; /* Default value for filter callback */
@@ -285,6 +292,17 @@ H5P_dxfr_reg_prop(H5P_genclass_t *pclass)
/* Register the actual io mode property. */
if(H5P_register_real(pclass, H5D_MPIO_ACTUAL_IO_MODE_NAME, H5D_MPIO_ACTUAL_IO_MODE_SIZE, &def_mpio_actual_io_mode, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ /* Register the MPI memory type property */
+ if(H5P_register_real(pclass, H5FD_MPI_XFER_MEM_MPI_TYPE_NAME, H5FD_MPI_XFER_MEM_MPI_TYPE_SIZE,
+ &btype, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ /* Register the MPI file type property */
+ if(H5P_register_real(pclass, H5FD_MPI_XFER_FILE_MPI_TYPE_NAME, H5FD_MPI_XFER_FILE_MPI_TYPE_SIZE,
+ &ftype, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
#endif /* H5_HAVE_PARALLEL */
/* Register the EDC property */