diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-05-22 14:06:16 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-05-22 14:06:16 (GMT) |
commit | 1440f1cd87522330ed5bff30d546cacc05adf18e (patch) | |
tree | 2e94832810f953d4321cb818ff95f55f6e2ae274 /src | |
parent | bce79181a88b6b780f1d93ff5564f48f8d9d83cc (diff) | |
parent | 0cbde329bd1dcf82c909f16bf49929a437c608a2 (diff) | |
download | hdf5-1440f1cd87522330ed5bff30d546cacc05adf18e.zip hdf5-1440f1cd87522330ed5bff30d546cacc05adf18e.tar.gz hdf5-1440f1cd87522330ed5bff30d546cacc05adf18e.tar.bz2 |
[svn-r22389] merge from trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Dmpio.c | 9 | ||||
-rw-r--r-- | src/H5FDmpi.c | 49 | ||||
-rw-r--r-- | src/H5FDmpi.h | 7 | ||||
-rw-r--r-- | src/H5Pdxpl.c | 20 | ||||
-rw-r--r-- | src/H5Pint.c | 6 | ||||
-rw-r--r-- | src/H5R.c | 6 | ||||
-rw-r--r-- | src/H5public.h | 4 | ||||
-rw-r--r-- | src/Makefile.in | 2 |
8 files changed, 40 insertions, 63 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 45cf6a1..9b8fa27 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -1542,15 +1542,13 @@ static herr_t H5D__final_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t mpi_buf_count, MPI_Datatype *mpi_file_type, MPI_Datatype *mpi_buf_type) { - hbool_t plist_is_setup = FALSE; /* Whether the dxpl has been customized */ herr_t ret_value = SUCCEED; FUNC_ENTER_STATIC /* Pass buf type, file type to the file driver. */ - if(H5FD_mpi_setup_collective(io_info->dxpl_id, *mpi_buf_type, *mpi_file_type) < 0) + if(H5FD_mpi_setup_collective(io_info->dxpl_id, mpi_buf_type, mpi_file_type) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set MPI-I/O properties") - plist_is_setup = TRUE; if(io_info->op_type == H5D_IO_OP_WRITE) { if((io_info->io_ops.single_write)(io_info, type_info, mpi_buf_count, NULL, NULL) < 0) @@ -1562,11 +1560,6 @@ H5D__final_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf } /* end else */ done: - /* Reset the dxpl settings */ - if(plist_is_setup) - if(H5FD_mpi_teardown_collective(io_info->dxpl_id) < 0) - HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "unable to reset dxpl values") - #ifdef H5D_DEBUG if(H5DEBUG(D)) HDfprintf(H5DEBUG(D),"ret_value before leaving final_collective_io=%d\n",ret_value); diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c index ff2c87d..afc5536 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,15 @@ 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 */ - diff --git a/src/H5FDmpi.h b/src/H5FDmpi.h index 2b7ac98..4140671 100644 --- a/src/H5FDmpi.h +++ b/src/H5FDmpi.h @@ -77,10 +77,8 @@ typedef struct H5FD_class_mpi_t { /* ======== Temporary data transfer properties ======== */ /* Definitions for memory MPI type property */ #define H5FD_MPI_XFER_MEM_MPI_TYPE_NAME "H5FD_mpi_mem_mpi_type" -#define H5FD_MPI_XFER_MEM_MPI_TYPE_SIZE sizeof(MPI_Datatype) /* Definitions for file MPI type property */ #define H5FD_MPI_XFER_FILE_MPI_TYPE_NAME "H5FD_mpi_file_mpi_type" -#define H5FD_MPI_XFER_FILE_MPI_TYPE_SIZE sizeof(MPI_Datatype) /* * The view is set to this value @@ -101,9 +99,8 @@ H5_DLL herr_t H5FD_mpi_comm_info_free(MPI_Comm *comm, MPI_Info *info); H5_DLL herr_t H5FD_mpio_wait_for_left_neighbor(H5FD_t *file); H5_DLL herr_t H5FD_mpio_signal_right_neighbor(H5FD_t *file); #endif /* NOT_YET */ -H5_DLL herr_t H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype btype, - MPI_Datatype ftype); -H5_DLL herr_t H5FD_mpi_teardown_collective(hid_t dxpl_id); +H5_DLL herr_t H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype *btype, + MPI_Datatype *ftype); /* Driver specific methods */ H5_DLL int H5FD_mpi_get_rank(const H5FD_t *file); diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index c4ca95b..a4fc749 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -121,7 +121,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 */ @@ -210,6 +215,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 */ @@ -291,6 +298,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 */ diff --git a/src/H5Pint.c b/src/H5Pint.c index 46a06a0..b216ab3 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -2314,9 +2314,13 @@ H5P_insert(H5P_genplist_t *plist, const char *name, size_t size, /* Check if the property has been deleted */ if(NULL != H5SL_search(plist->del, name)) { + char *temp_name = NULL; /* Remove the property name from the deleted property skip list */ - if(NULL == H5SL_remove(plist->del, name)) + if(NULL == (temp_name = H5SL_remove(plist->del, name))) HGOTO_ERROR(H5E_PLIST,H5E_CANTDELETE,FAIL,"can't remove property from deleted skip list") + + /* free the name of the removed property */ + H5MM_xfree(temp_name); } /* end if */ else { H5P_genclass_t *tclass; /* Temporary class pointer */ @@ -530,9 +530,15 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r if(H5VL_object_lookup (obj_id, H5VL_OBJECT_LOOKUP_BY_REF, H5_REQUEST_NULL, &location, ref_type, _ref) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object") + /* Open the object through the VOL */ if((ret_value = H5VL_object_open_by_loc(obj_id, location, oapl_id, H5_REQUEST_NULL)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to open object") +#if 0 + /* Create reference */ + if((ret_value = H5R_dereference(file, oapl_id, H5AC_dxpl_id, ref_type, _ref, TRUE)) < 0) + HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to dereference object") +#endif done: if (NULL != location) { diff --git a/src/H5public.h b/src/H5public.h index 684e50c..d000650 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,10 +75,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 118 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 119 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.118" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.119" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index c158382..31ab17a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -485,7 +485,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 108 +LT_VERS_REVISION = 109 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) |