summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-09-25 14:04:40 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-09-25 14:04:40 (GMT)
commit593a6d6c66051675be6565bd7987f9a36863c28d (patch)
treec66f8616a847d435ddf88216c8dad87e9144f5fc /src
parent73b190b902432a477308c9e118fde69e87da613b (diff)
parent50e3990f2a9e3bba421460d8d5cb21bb6f6e98fe (diff)
downloadhdf5-593a6d6c66051675be6565bd7987f9a36863c28d.zip
hdf5-593a6d6c66051675be6565bd7987f9a36863c28d.tar.gz
hdf5-593a6d6c66051675be6565bd7987f9a36863c28d.tar.bz2
[svn-r22806]
merge from trunk up to 22805.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt26
-rw-r--r--src/H5Dio.c2
-rw-r--r--src/H5Dmpio.c66
-rw-r--r--src/H5Dpkg.h3
-rw-r--r--src/H5Dprivate.h2
-rw-r--r--src/H5FDmpiposix.c6
-rw-r--r--src/H5P.c10
-rw-r--r--src/H5Pdxpl.c51
-rw-r--r--src/H5Pfapl.c114
-rw-r--r--src/H5Pfcpl.c2
-rw-r--r--src/H5Pgcpl.c18
-rw-r--r--src/H5Pint.c210
-rw-r--r--src/H5Plapl.c9
-rw-r--r--src/H5Pocpl.c55
-rw-r--r--src/H5Pocpypl.c201
-rw-r--r--src/H5Ppkg.h7
-rw-r--r--src/H5Pprivate.h2
-rw-r--r--src/H5Ppublic.h14
-rw-r--r--src/H5Pstrcpl.c33
-rw-r--r--src/H5Zprivate.h2
-rw-r--r--src/H5Ztrans.c8
-rw-r--r--src/H5public.h4
-rw-r--r--src/H5trace.c54
-rw-r--r--src/Makefile.in2
24 files changed, 530 insertions, 371 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 910bedc..6f4499f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,6 +2,11 @@ cmake_minimum_required (VERSION 2.8.6)
PROJECT (HDF5_SRC C CXX)
#-----------------------------------------------------------------------------
+# Apply Definitions to compiler in this directory and below
+#-----------------------------------------------------------------------------
+ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+
+#-----------------------------------------------------------------------------
# List Source Files
#-----------------------------------------------------------------------------
SET (H5_SRCS
@@ -12,6 +17,7 @@ SET (H5_SRCS
${HDF5_SRC_DIR}/H5timer.c
${HDF5_SRC_DIR}/H5trace.c
)
+
SET (H5_HDRS
${HDF5_SRC_DIR}/hdf5.h
${HDF5_SRC_DIR}/H5api_adpt.h
@@ -29,6 +35,7 @@ SET (H5A_SRCS
${HDF5_SRC_DIR}/H5Aint.c
${HDF5_SRC_DIR}/H5Atest.c
)
+
SET (H5A_HDRS
${HDF5_SRC_DIR}/H5Apkg.h
${HDF5_SRC_DIR}/H5Apublic.h
@@ -38,6 +45,7 @@ IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SRCS}" )
SET (H5AC_SRCS
${HDF5_SRC_DIR}/H5AC.c
)
+
SET (H5AC_HDRS
${HDF5_SRC_DIR}/H5ACpkg.h
${HDF5_SRC_DIR}/H5ACpublic.h
@@ -109,6 +117,7 @@ SET (H5D_SRCS
${HDF5_SRC_DIR}/H5Dselect.c
${HDF5_SRC_DIR}/H5Dtest.c
)
+
SET (H5D_HDRS
${HDF5_SRC_DIR}/H5Dpkg.h
${HDF5_SRC_DIR}/H5Dpublic.h
@@ -120,6 +129,7 @@ SET (H5E_SRCS
${HDF5_SRC_DIR}/H5Edeprec.c
${HDF5_SRC_DIR}/H5Eint.c
)
+
SET (H5E_HDRS
${HDF5_SRC_DIR}/H5Edefin.h
${HDF5_SRC_DIR}/H5Einit.h
@@ -168,6 +178,7 @@ SET (H5F_SRCS
${HDF5_SRC_DIR}/H5Fsuper_cache.c
${HDF5_SRC_DIR}/H5Ftest.c
)
+
SET (H5F_HDRS
${HDF5_SRC_DIR}/H5Fpkg.h
${HDF5_SRC_DIR}/H5Fpublic.h
@@ -207,6 +218,7 @@ SET (H5FD_SRCS
${HDF5_SRC_DIR}/H5FDstdio.c
${HDF5_SRC_DIR}/H5FDwindows.c
)
+
SET (H5FD_HDRS
${HDF5_SRC_DIR}/H5FDcore.h
${HDF5_SRC_DIR}/H5FDdirect.h
@@ -249,6 +261,7 @@ SET (H5FS_SRCS
${HDF5_SRC_DIR}/H5FSstat.c
${HDF5_SRC_DIR}/H5FStest.c
)
+
SET (H5FS_HDRS
${HDF5_SRC_DIR}/H5FSpkg.h
${HDF5_SRC_DIR}/H5FSpublic.h
@@ -275,6 +288,7 @@ SET (H5G_SRCS
${HDF5_SRC_DIR}/H5Gtest.c
${HDF5_SRC_DIR}/H5Gtraverse.c
)
+
SET (H5G_HDRS
${HDF5_SRC_DIR}/H5Gpkg.h
${HDF5_SRC_DIR}/H5Gpublic.h
@@ -299,6 +313,7 @@ SET (H5HF_SRCS
${HDF5_SRC_DIR}/H5HFtest.c
${HDF5_SRC_DIR}/H5HFtiny.c
)
+
SET (H5HF_HDRS
${HDF5_SRC_DIR}/H5HFpkg.h
${HDF5_SRC_DIR}/H5HFpublic.h
@@ -311,6 +326,7 @@ SET (H5HG_SRCS
${HDF5_SRC_DIR}/H5HGdbg.c
${HDF5_SRC_DIR}/H5HGquery.c
)
+
SET (H5HG_HDRS
${HDF5_SRC_DIR}/H5HGpkg.h
${HDF5_SRC_DIR}/H5HGpublic.h
@@ -323,6 +339,7 @@ SET (H5HL_SRCS
${HDF5_SRC_DIR}/H5HLdbg.c
${HDF5_SRC_DIR}/H5HLint.c
)
+
SET (H5HL_HDRS
${HDF5_SRC_DIR}/H5HLpkg.h
${HDF5_SRC_DIR}/H5HLpublic.h
@@ -366,6 +383,7 @@ SET (H5MF_SRCS
${HDF5_SRC_DIR}/H5MFdbg.c
${HDF5_SRC_DIR}/H5MFsection.c
)
+
SET (H5MF_HDRS
)
IDE_GENERATED_PROPERTIES ("H5MF" "${H5MF_HDRS}" "${H5MF_SRCS}" )
@@ -384,6 +402,7 @@ SET (H5MP_SRCS
${HDF5_SRC_DIR}/H5MP.c
${HDF5_SRC_DIR}/H5MPtest.c
)
+
SET (H5MP_HDRS
${HDF5_SRC_DIR}/H5MPpkg.h
)
@@ -424,6 +443,7 @@ SET (H5O_SRCS
${HDF5_SRC_DIR}/H5Otest.c
${HDF5_SRC_DIR}/H5Ounknown.c
)
+
SET (H5O_HDRS
${HDF5_SRC_DIR}/H5Opkg.h
${HDF5_SRC_DIR}/H5Opublic.h
@@ -450,6 +470,7 @@ SET (H5P_SRCS
${HDF5_SRC_DIR}/H5Pstrcpl.c
${HDF5_SRC_DIR}/H5Ptest.c
)
+
SET (H5P_HDRS
${HDF5_SRC_DIR}/H5Ppkg.h
${HDF5_SRC_DIR}/H5Ppublic.h
@@ -495,6 +516,7 @@ SET (H5S_SRCS
${HDF5_SRC_DIR}/H5Sselect.c
${HDF5_SRC_DIR}/H5Stest.c
)
+
SET (H5S_HDRS
${HDF5_SRC_DIR}/H5Spkg.h
${HDF5_SRC_DIR}/H5Spublic.h
@@ -517,6 +539,7 @@ SET (H5SM_SRCS
${HDF5_SRC_DIR}/H5SMmessage.c
${HDF5_SRC_DIR}/H5SMtest.c
)
+
SET (H5SM_HDRS
${HDF5_SRC_DIR}/H5SMpkg.h
)
@@ -556,6 +579,7 @@ SET (H5T_SRCS
${HDF5_SRC_DIR}/H5Tvisit.c
${HDF5_SRC_DIR}/H5Tvlen.c
)
+
SET (H5T_HDRS
${HDF5_SRC_DIR}/H5Tpkg.h
${HDF5_SRC_DIR}/H5Tpublic.h
@@ -614,6 +638,8 @@ IF (H5_ZLIB_HEADER)
SET_PROPERTY(SOURCE ${HDF5_SRC_DIR}/H5Zdeflate.c PROPERTY
COMPILE_DEFINITIONS H5_ZLIB_HEADER="${H5_ZLIB_HEADER}")
ENDIF (H5_ZLIB_HEADER)
+
+
SET (H5Z_HDRS
${HDF5_SRC_DIR}/H5Zpkg.h
${HDF5_SRC_DIR}/H5Zpublic.h
diff --git a/src/H5Dio.c b/src/H5Dio.c
index f6c7d56..a37b4b3 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -943,7 +943,7 @@ H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve MPI communicator")
/* Check if we can set direct MPI-IO read/write functions */
- if((opt = H5D__mpio_opt_possible(io_info, file_space, mem_space, type_info, fm)) < 0)
+ if((opt = H5D__mpio_opt_possible(io_info, file_space, mem_space, type_info, fm, dx_plist)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid check for direct IO dataspace ")
/* Check if we can use the optimized parallel I/O routines */
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 9b8fa27..c2d964e 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -156,10 +156,12 @@ static herr_t H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info,
htri_t
H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
const H5S_t *mem_space, const H5D_type_info_t *type_info,
- const H5D_chunk_map_t *fm)
+ const H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist)
{
- int local_opinion = TRUE; /* This process's idea of whether to perform collective I/O or not */
- int consensus; /* Consensus opinion of all processes */
+ /* variables to set cause of broken collective I/O */
+ int local_cause = 0;
+ int global_cause = 0;
+
int mpi_code; /* MPI error code */
htri_t ret_value = TRUE;
@@ -171,51 +173,54 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
HDassert(file_space);
HDassert(type_info);
+
/* For independent I/O, get out quickly and don't try to form consensus */
- if(io_info->dxpl_cache->xfer_mode == H5FD_MPIO_INDEPENDENT)
+ if(io_info->dxpl_cache->xfer_mode == H5FD_MPIO_INDEPENDENT) {
+ local_cause = H5D_MPIO_SET_INDEPENDENT;
+ global_cause = H5D_MPIO_SET_INDEPENDENT;
HGOTO_DONE(FALSE);
+ }
+
+ /* Optimized MPI types flag must be set and it must be collective IO */
+ /* (Don't allow parallel I/O for the MPI-posix driver, since it doesn't do real collective I/O) */
+ if(!(H5S_mpi_opt_types_g && io_info->dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE
+ && !IS_H5FD_MPIPOSIX(io_info->dset->oloc.file))) {
+ local_cause |= H5D_MPIO_SET_MPIPOSIX;
+ } /* end if */
/* Don't allow collective operations if datatype conversions need to happen */
if(!type_info->is_conv_noop) {
- local_opinion = FALSE;
- goto broadcast;
+ local_cause |= H5D_MPIO_DATATYPE_CONVERSION;
} /* end if */
/* Don't allow collective operations if data transform operations should occur */
if(!type_info->is_xform_noop) {
- local_opinion = FALSE;
- goto broadcast;
- } /* end if */
-
- /* Optimized MPI types flag must be set and it must be collective IO */
- /* (Don't allow parallel I/O for the MPI-posix driver, since it doesn't do real collective I/O) */
- if(!(H5S_mpi_opt_types_g && io_info->dxpl_cache->xfer_mode == H5FD_MPIO_COLLECTIVE
- && !IS_H5FD_MPIPOSIX(io_info->dset->oloc.file))) {
- local_opinion = FALSE;
- goto broadcast;
+ local_cause |= H5D_MPIO_DATA_TRANSFORMS;
} /* end if */
/* Check whether these are both simple or scalar dataspaces */
if(!((H5S_SIMPLE == H5S_GET_EXTENT_TYPE(mem_space) || H5S_SCALAR == H5S_GET_EXTENT_TYPE(mem_space))
&& (H5S_SIMPLE == H5S_GET_EXTENT_TYPE(file_space) || H5S_SCALAR == H5S_GET_EXTENT_TYPE(file_space)))) {
- local_opinion = FALSE;
- goto broadcast;
+ local_cause |= H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES;
} /* end if */
/* Can't currently handle point selections */
if(H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(mem_space)
|| H5S_SEL_POINTS == H5S_GET_SELECT_TYPE(file_space)) {
- local_opinion = FALSE;
- goto broadcast;
+ local_cause |= H5D_MPIO_POINT_SELECTIONS;
} /* end if */
/* Dataset storage must be contiguous or chunked */
if(!(io_info->dset->shared->layout.type == H5D_CONTIGUOUS ||
io_info->dset->shared->layout.type == H5D_CHUNKED)) {
- local_opinion = FALSE;
- goto broadcast;
+ local_cause |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET;
} /* end if */
+ /* check if external-file storage is used */
+ if (io_info->dset->shared->dcpl_cache.efl.nused > 0) {
+ local_cause |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET;
+ }
+
/* The handling of memory space is different for chunking and contiguous
* storage. For contiguous storage, mem_space and file_space won't change
* when it it is doing disk IO. For chunking storage, mem_space will
@@ -226,21 +231,28 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
/* Don't allow collective operations if filters need to be applied */
if(io_info->dset->shared->layout.type == H5D_CHUNKED) {
if(io_info->dset->shared->dcpl_cache.pline.nused > 0) {
- local_opinion = FALSE;
- goto broadcast;
+ local_cause |= H5D_MPIO_FILTERS;
} /* end if */
} /* end if */
-broadcast:
/* Form consensus opinion among all processes about whether to perform
* collective I/O
*/
- if(MPI_SUCCESS != (mpi_code = MPI_Allreduce(&local_opinion, &consensus, 1, MPI_INT, MPI_LAND, io_info->comm)))
+ if(MPI_SUCCESS != (mpi_code = MPI_Allreduce(&local_cause, &global_cause, 1, MPI_INT, MPI_BOR, io_info->comm)))
HMPI_GOTO_ERROR(FAIL, "MPI_Allreduce failed", mpi_code)
- ret_value = consensus > 0 ? TRUE : FALSE;
+ ret_value = global_cause > 0 ? FALSE : TRUE;
+
done:
+ /* Write the local value of no-collective-cause to the DXPL. */
+ if(H5P_set(dx_plist, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, &local_cause) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set local no collective cause property")
+
+ /* Write the global value of no-collective-cause to the DXPL. */
+ if(H5P_set(dx_plist, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, &global_cause) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set global no collective cause property")
+
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__mpio_opt_possible() */
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index dfc19b8..ed6da8f 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -693,7 +693,8 @@ H5_DLL herr_t H5D__chunk_collective_write(H5D_io_info_t *io_info,
* memory and the file */
H5_DLL htri_t H5D__mpio_opt_possible(const H5D_io_info_t *io_info,
const H5S_t *file_space, const H5S_t *mem_space,
- const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm);
+ const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm,
+ H5P_genplist_t *dx_plist);
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h
index bee87fa..8eaf642 100644
--- a/src/H5Dprivate.h
+++ b/src/H5Dprivate.h
@@ -74,6 +74,8 @@
#define H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME "mpio_chunk_opt_ratio"
#define H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME "actual_chunk_opt_mode"
#define H5D_MPIO_ACTUAL_IO_MODE_NAME "actual_io_mode"
+#define H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME "local_no_collective_cause" /* cause of broken collective I/O in each process */
+#define H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME "global_no_collective_cause" /* cause of broken collective I/O in all processes */
#endif /* H5_HAVE_PARALLEL */
#define H5D_XFER_EDC_NAME "err_detect" /* EDC */
#define H5D_XFER_FILTER_CB_NAME "filter_cb" /* Filter callback function */
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c
index 261f427..0d0b839 100644
--- a/src/H5FDmpiposix.c
+++ b/src/H5FDmpiposix.c
@@ -14,10 +14,10 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.ed>
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Thursday, July 11, 2002
*
- * Purpose: This is a "combination" MPI-2 and posix I/O driver.
+ * Purpose: This is a "combination" MPI-2 and posix I/O driver.
* It uses MPI for coordinating the actions of several processes
* and posix I/O calls to do the actual I/O to the disk.
*
@@ -230,7 +230,7 @@ static const H5FD_class_mpi_t H5FD_mpiposix_g = {
H5FD_mpiposix_truncate, /* truncate */
NULL, /* lock */
NULL, /* unlock */
- H5FD_FLMAP_SINGLE /* fl_map */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
}, /* End of superclass information */
H5FD_mpiposix_mpi_rank, /* get_rank */
H5FD_mpiposix_mpi_size, /* get_size */
diff --git a/src/H5P.c b/src/H5P.c
index ba286fb..c7ed30b 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -990,8 +990,13 @@ H5Pequal(hid_t id1, hid_t id2)
/* Compare property lists */
if(H5I_GENPROP_LST == H5I_get_type(id1)) {
- if(H5P_cmp_plist((const H5P_genplist_t *)obj1, (const H5P_genplist_t *)obj2) == 0)
- ret_value = TRUE;
+ int cmp_ret = 0;
+
+ if(H5P_cmp_plist((const H5P_genplist_t *)obj1, (const H5P_genplist_t *)obj2, &cmp_ret) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, FAIL, "can't compare property lists")
+
+ /* Set return value */
+ ret_value = cmp_ret == 0 ? TRUE : FALSE;
} /* end if */
/* Must be property classes */
else {
@@ -1062,6 +1067,7 @@ done:
void *udata; IN/OUT: Pointer to iteration data from user
RETURNS
Success: Returns the return value of the last call to ITER_FUNC
+ Failure: negative value
DESCRIPTION
This routine calls the actual callback routine for the property in the
property list or class.
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index d0e728c..71daa73 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -102,6 +102,9 @@
/* Definitions for chunk io mode property. */
#define H5D_MPIO_ACTUAL_IO_MODE_SIZE sizeof(H5D_mpio_actual_io_mode_t)
#define H5D_MPIO_ACTUAL_IO_MODE_DEF H5D_MPIO_NO_COLLECTIVE
+/* Definitions for cause of broken collective io property */
+#define H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE sizeof(uint32_t)
+#define H5D_MPIO_NO_COLLECTIVE_CAUSE_DEF H5D_MPIO_COLLECTIVE
/* 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
@@ -211,6 +214,7 @@ 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;
+ H5D_mpio_no_collective_cause_t def_mpio_no_collective_cause = H5D_MPIO_NO_COLLECTIVE_CAUSE_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 */
@@ -287,6 +291,14 @@ H5P__dxfr_reg_prop(H5P_genclass_t *pclass)
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 local cause of broken collective I/O */
+ if(H5P_register_real(pclass, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE, &def_mpio_no_collective_cause, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ /* Register the global cause of broken collective I/O */
+ if(H5P_register_real(pclass, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, H5D_MPIO_NO_COLLECTIVE_CAUSE_SIZE, &def_mpio_no_collective_cause, 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)
@@ -1360,5 +1372,44 @@ H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_mpio_actual_io_mode() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pget_mpio_no_collective_cause
+ *
+ * Purpose: Retrieves cause for the broke collective I/O
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Jonathan Kim
+ * Aug 3, 2012
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, uint32_t *global_no_collective_cause)
+{
+ H5P_genplist_t *plist;
+ herr_t ret_value = SUCCEED; /* return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE3("e", "i*Dn*Dn", plist_id, local_no_collective_cause,
+ global_no_collective_cause);
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* Return values */
+ if(local_no_collective_cause)
+ if(H5P_get(plist, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, local_no_collective_cause) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get local value")
+ if(global_no_collective_cause)
+ if(H5P_get(plist, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, global_no_collective_cause) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get global value")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pget_mpio_no_collective_cause() */
+
+
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index aa57e58..a2e09f8 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -70,7 +70,7 @@
#define H5F_ACS_DATA_CACHE_BYTE_SIZE_DEF (1024*1024)
/* Definition for preemption read chunks first */
#define H5F_ACS_PREEMPT_READ_CHUNKS_SIZE sizeof(double)
-#define H5F_ACS_PREEMPT_READ_CHUNKS_DEF 0.75
+#define H5F_ACS_PREEMPT_READ_CHUNKS_DEF 0.75f
/* Definition for threshold for alignment */
#define H5F_ACS_ALIGN_THRHD_SIZE sizeof(hsize_t)
#define H5F_ACS_ALIGN_THRHD_DEF 1
@@ -165,6 +165,7 @@ static herr_t H5P_file_image_info_del(hid_t prop_id, const char *name, size_t si
static herr_t H5P_file_image_info_copy(const char *name, size_t size, void *value);
static herr_t H5P_file_image_info_close(const char *name, size_t size, void *value);
+
/*********************/
/* Package Variables */
/*********************/
@@ -574,18 +575,18 @@ H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment)
H5TRACE3("e", "ihh", fapl_id, threshold, alignment);
/* Check args */
- if (alignment<1)
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "alignment must be positive");
+ if(alignment < 1)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "alignment must be positive")
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Set values */
if(H5P_set(plist, H5F_ACS_ALIGN_THRHD_NAME, &threshold) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set threshold");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set threshold")
if(H5P_set(plist, H5F_ACS_ALIGN_NAME, &alignment) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set alignment");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set alignment")
done:
FUNC_LEAVE_API(ret_value)
@@ -758,10 +759,10 @@ H5P_get_driver(H5P_genplist_t *plist)
/* Get the current driver ID */
if(TRUE == H5P_isa_class(plist->plist_id, H5P_FILE_ACCESS)) {
if(H5P_get(plist, H5F_ACS_FILE_DRV_ID_NAME, &ret_value) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get driver ID")
} /* end if */
else
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list")
if(H5FD_VFD_DEFAULT == ret_value)
ret_value = H5_DEFAULT_VFD;
@@ -1068,17 +1069,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, May 19, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property list.
- *
- * J. Mainzer
- * Thurs. 3/17/05
- * The mdc_nelmts entry is no more in the FAPL, so I modified
- * the code to ignore it.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1093,24 +1083,24 @@ H5Pset_cache(hid_t plist_id, int UNUSED mdc_nelmts,
rdcc_w0);
/* Check arguments */
- if (rdcc_w0<0.0 || rdcc_w0>1.0)
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "raw data cache w0 value must be between 0.0 and 1.0 inclusive");
+ if(rdcc_w0 < 0.0 || rdcc_w0 > 1.0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "raw data cache w0 value must be between 0.0 and 1.0 inclusive")
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Set sizes */
if(H5P_set(plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, &rdcc_nslots) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set data cache number of slots");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set data cache number of slots")
if(H5P_set(plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, &rdcc_nbytes) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set data cache byte size");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set data cache byte size")
if(H5P_set(plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, &rdcc_w0) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set preempt read chunks");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't set preempt read chunks")
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Pset_cache() */
/*-------------------------------------------------------------------------
@@ -1127,18 +1117,6 @@ done:
* Programmer: Robb Matzke
* Tuesday, May 19, 1998
*
- * Modifications:
- *
- * Raymond Lu
- * Tuesday, Oct 23, 2001
- * Changed the file access list to the new generic property
- * list.
- *
- * J Mainzer
- * Thurs, 3/17/05
- * The mdc_nelmts fapl entry is no more, so we now just
- * return a constant when that value is requested.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -1154,27 +1132,27 @@ H5Pget_cache(hid_t plist_id, int *mdc_nelmts,
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get sizes */
/* the mdc_nelmts FAPL entry no longer exists, so just return a constant */
- if (mdc_nelmts)
+ if(mdc_nelmts)
*mdc_nelmts = 0;
- if (rdcc_nslots)
+ if(rdcc_nslots)
if(H5P_get(plist, H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME, rdcc_nslots) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache number of slots");
- if (rdcc_nbytes)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache number of slots")
+ if(rdcc_nbytes)
if(H5P_get(plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, rdcc_nbytes) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache byte size");
- if (rdcc_w0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get data cache byte size")
+ if(rdcc_w0)
if(H5P_get(plist, H5F_ACS_PREEMPT_READ_CHUNKS_NAME, rdcc_w0) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get preempt read chunks");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get preempt read chunks")
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Pget_cache() */
/*-------------------------------------------------------------------------
@@ -1314,11 +1292,11 @@ H5Pset_gc_references(hid_t plist_id, unsigned gc_ref)
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Set values */
if(H5P_set(plist, H5F_ACS_GARBG_COLCT_REF_NAME, &gc_ref) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set garbage collect reference");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set garbage collect reference")
done:
FUNC_LEAVE_API(ret_value)
@@ -1356,12 +1334,12 @@ H5Pget_gc_references(hid_t plist_id, unsigned *gc_ref/*out*/)
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get values */
- if (gc_ref)
+ if(gc_ref)
if(H5P_get(plist, H5F_ACS_GARBG_COLCT_REF_NAME, gc_ref) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get garbage collect reference");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get garbage collect reference")
done:
FUNC_LEAVE_API(ret_value)
@@ -1479,11 +1457,11 @@ H5Pset_meta_block_size(hid_t plist_id, hsize_t size)
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Set values */
if(H5P_set(plist, H5F_ACS_META_BLOCK_SIZE_NAME, &size) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set meta data block size");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set meta data block size")
done:
FUNC_LEAVE_API(ret_value)
@@ -1521,12 +1499,12 @@ H5Pget_meta_block_size(hid_t plist_id, hsize_t *size/*out*/)
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get values */
- if (size) {
+ if(size) {
if(H5P_get(plist, H5F_ACS_META_BLOCK_SIZE_NAME, size) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get meta data block size");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get meta data block size")
} /* end if */
done:
@@ -1574,11 +1552,11 @@ H5Pset_sieve_buf_size(hid_t plist_id, size_t size)
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Set values */
if(H5P_set(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &size) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set sieve buffer size");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set sieve buffer size")
done:
FUNC_LEAVE_API(ret_value)
@@ -1616,12 +1594,12 @@ H5Pget_sieve_buf_size(hid_t plist_id, size_t *size/*out*/)
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get values */
- if (size)
+ if(size)
if(H5P_get(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, size) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get sieve buffer size");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get sieve buffer size")
done:
FUNC_LEAVE_API(ret_value)
@@ -1663,11 +1641,11 @@ H5Pset_small_data_block_size(hid_t plist_id, hsize_t size)
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Set values */
if(H5P_set(plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &size) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' block size");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' block size")
done:
FUNC_LEAVE_API(ret_value)
@@ -1700,12 +1678,12 @@ H5Pget_small_data_block_size(hid_t plist_id, hsize_t *size/*out*/)
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get values */
- if (size) {
+ if(size) {
if(H5P_get(plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, size) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get 'small data' block size");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get 'small data' block size")
} /* end if */
done:
@@ -2142,7 +2120,7 @@ H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len)
/* validate parameters */
if(!(((buf_ptr == NULL) && (buf_len == 0)) || ((buf_ptr != NULL) && (buf_len > 0))))
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "inconsistant buf_ptr and buf_len");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "inconsistant buf_ptr and buf_len")
/* Get the plist structure */
if(NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index cd6a7cd..21d45df 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -99,6 +99,7 @@
/* Property class callbacks */
static herr_t H5P_fcrt_reg_prop(H5P_genclass_t *pclass);
+
/*********************/
/* Package Variables */
/*********************/
@@ -207,6 +208,7 @@ H5P_fcrt_reg_prop(H5P_genclass_t *pclass)
/* Register the free space section threshold */
if(H5P_register_real(pclass, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, H5F_CRT_FREE_SPACE_THRESHOLD_SIZE, &free_space_threshold, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P_fcrt_reg_prop() */
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index 90e8d8c..41f3f01 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -58,7 +58,7 @@
/********************/
/* Property class callbacks */
-static herr_t H5P_gcrt_reg_prop(H5P_genclass_t *pclass);
+static herr_t H5P__gcrt_reg_prop(H5P_genclass_t *pclass);
/*********************/
@@ -72,7 +72,7 @@ const H5P_libclass_t H5P_CLS_GCRT[1] = {{
&H5P_CLS_OBJECT_CREATE_g, /* Parent class ID */
&H5P_CLS_GROUP_CREATE_g, /* Pointer to class ID */
&H5P_LST_GROUP_CREATE_g, /* Pointer to default property list ID */
- H5P_gcrt_reg_prop, /* Default property registration routine */
+ H5P__gcrt_reg_prop, /* Default property registration routine */
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -94,7 +94,7 @@ const H5P_libclass_t H5P_CLS_GCRT[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5P_gcrt_reg_prop
+ * Function: H5P__gcrt_reg_prop
*
* Purpose: Initialize the group creation property list class
*
@@ -105,22 +105,22 @@ const H5P_libclass_t H5P_CLS_GCRT[1] = {{
*-------------------------------------------------------------------------
*/
static herr_t
-H5P_gcrt_reg_prop(H5P_genclass_t *pclass)
+H5P__gcrt_reg_prop(H5P_genclass_t *pclass)
{
H5O_ginfo_t ginfo = H5G_CRT_GROUP_INFO_DEF; /* Default group info settings */
H5O_linfo_t linfo = H5G_CRT_LINK_INFO_DEF; /* Default link info settings */
hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Register group info property */
if(H5P_register_real(pclass, H5G_CRT_GROUP_INFO_NAME, H5G_CRT_GROUP_INFO_SIZE, &ginfo, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
/* Register link info property */
if(H5P_register_real(pclass, H5G_CRT_LINK_INFO_NAME, H5G_CRT_LINK_INFO_SIZE, &linfo, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
/* Register the lcpl ID property */
if(H5P_register_real(pclass, H5VL_GRP_LCPL_ID, sizeof(hid_t), &lcpl_id,
@@ -129,7 +129,7 @@ H5P_gcrt_reg_prop(H5P_genclass_t *pclass)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_gcrt_reg_prop() */
+} /* end H5P__gcrt_reg_prop() */
/*-------------------------------------------------------------------------
@@ -162,7 +162,7 @@ H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info")
/* Update field */
- ginfo.lheap_size_hint = size_hint;
+ H5_ASSIGN_OVERFLOW(ginfo.lheap_size_hint, size_hint, size_t, uint32_t);
/* Set value */
if(H5P_set(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 63862ef..b2972ef 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -59,7 +59,7 @@ typedef struct {
typedef struct {
H5P_iterate_int_t cb_func; /* Iterator callback */
void *udata; /* Iterator callback pointer */
- H5P_genplist_t *plist; /* Property list pointer */
+ const H5P_genplist_t *plist; /* Property list pointer */
H5SL_t *seen; /* Skip list to hold names of properties already seen */
int *curr_idx_ptr; /* Pointer to current iteration index */
int prev_idx; /* Previous iteration index */
@@ -73,6 +73,12 @@ typedef struct {
int prev_idx; /* Previous iteration index */
} H5P_iter_pclass_ud_t;
+/* Typedef for property list comparison callback */
+typedef struct {
+ const H5P_genplist_t *plist2; /* Pointer to second property list */
+ int cmp_value; /* Value from property comparison */
+} H5P_plist_cmp_ud_t;
+
/********************/
/* Local Prototypes */
@@ -1104,7 +1110,7 @@ done:
Internal routine to check for a property in a property list's skip list
USAGE
H5P_genprop_t *H5P_find_prop(plist, name)
- H5P_genplist_t *plist; IN: Pointer to property list to check
+ const H5P_genplist_t *plist; IN: Pointer to property list to check
const char *name; IN: Name of property to check for
RETURNS
Returns pointer to property on success, NULL on failure.
@@ -1116,7 +1122,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
H5P_genprop_t *
-H5P__find_prop_plist(H5P_genplist_t *plist, const char *name)
+H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name)
{
H5P_genprop_t *ret_value; /* Property pointer return value */
@@ -2575,7 +2581,7 @@ done:
Internal routine to query the existance of a property in a property list.
USAGE
herr_t H5P_exist_plist(plist, name)
- H5P_genplist_t *plist; IN: Property list to check
+ const H5P_genplist_t *plist; IN: Property list to check
const char *name; IN: Name of property to check for
RETURNS
Success: Positive if the property exists in the property list, zero
@@ -2590,7 +2596,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5P_exist_plist(H5P_genplist_t *plist, const char *name)
+H5P_exist_plist(const H5P_genplist_t *plist, const char *name)
{
htri_t ret_value = FAIL; /* return value */
@@ -2690,7 +2696,7 @@ done:
Internal routine to query the size of a property in a property list.
USAGE
herr_t H5P_get_size_plist(plist, name)
- H5P_genplist_t *plist; IN: Property list to check
+ const H5P_genplist_t *plist; IN: Property list to check
const char *name; IN: Name of property to query
size_t *size; OUT: Size of property
RETURNS
@@ -2706,7 +2712,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_get_size_plist(H5P_genplist_t *plist, const char *name, size_t *size)
+H5P_get_size_plist(const H5P_genplist_t *plist, const char *name, size_t *size)
{
H5P_genprop_t *prop; /* Temporary property pointer */
herr_t ret_value=SUCCEED; /* return value */
@@ -3089,105 +3095,141 @@ done:
/*--------------------------------------------------------------------------
NAME
+ H5P__cmp_plist_cb
+ PURPOSE
+ Internal callback routine when iterating over properties in property list
+ to compare them for equality
+ USAGE
+ int H5P__cmp_plist_cb(prop, udata)
+ H5P_genprop_t *prop; IN: Pointer to the property
+ void *udata; IN/OUT: Pointer to iteration data from user
+ RETURNS
+ Success: Returns whether to continue (H5_ITER_CONT) or stop (H5_ITER_STOP)
+ iterating over the property lists.
+ Failure: Negative value (H5_ITER_ERROR)
+ DESCRIPTION
+ This routine compares a property from one property list (the one being
+ iterated over, to a property from the second property list (which is
+ looked up). Iteration is stopped if the comparison is non-equal.
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+static int
+H5P__cmp_plist_cb(H5P_genprop_t *prop, void *_udata)
+{
+ H5P_plist_cmp_ud_t *udata = (H5P_plist_cmp_ud_t *)_udata; /* Pointer to user data */
+ htri_t prop2_exist; /* Whether the property exists in the second property list */
+ int ret_value = H5_ITER_CONT; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Sanity check */
+ HDassert(prop);
+ HDassert(udata);
+
+ /* Check if the property exists in the second property list */
+ if((prop2_exist = H5P_exist_plist(udata->plist2, prop->name)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5_ITER_ERROR, "can't lookup existance of property?")
+ if(prop2_exist) {
+ const H5P_genprop_t *prop2; /* Pointer to property in second plist */
+
+ /* Look up same property in second property list */
+ if(NULL == (prop2 = H5P__find_prop_plist(udata->plist2, prop->name)))
+ HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5_ITER_ERROR, "property doesn't exist")
+
+ /* Compare the two properties */
+ if((udata->cmp_value = H5P_cmp_prop(prop, prop2)) != 0)
+ HGOTO_DONE(H5_ITER_STOP);
+ } /* end if */
+ else {
+ /* Property exists in first list, but not second */
+ udata->cmp_value = 1;
+ HGOTO_DONE(H5_ITER_STOP);
+ } /* end else */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5P__cmp_plist_cb() */
+
+
+/*--------------------------------------------------------------------------
+ NAME
H5P_cmp_plist
PURPOSE
Internal routine to compare two generic property lists
USAGE
- int H5P_cmp_plist(plist1, plist2)
+ herr_t H5P_cmp_plist(plist1, plist2, cmp_ret)
H5P_genplist_t *plist1; IN: 1st property list to compare
H5P_genplist_t *plist2; IN: 2nd property list to compare
+ int *cmp_ret; OUT: Comparison value for two property lists
+ Negative if list1 "less" than list2,
+ positive if list1 "greater" than list2,
+ zero if list1 is "equal" to list2
RETURNS
- Success: negative if list1 "less" than list2, positive if list1 "greater"
- than list2, zero if list1 is "equal" to list2
- Failure: can't fail
+ Success: non-negative value
+ Failure: negative value
DESCRIPTION
This function compares two generic property lists together to see if
- they are the same list.
-
+ they are equal.
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-int
-H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2)
+herr_t
+H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2,
+ int *cmp_ret)
{
- H5SL_node_t *tnode1, *tnode2; /* Temporary pointer to property nodes */
- int cmp_value; /* Value from comparison */
- int ret_value = 0; /* return value */
+ H5P_plist_cmp_ud_t udata; /* User data for callback */
+ int idx = 0; /* Index of property to begin with */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_NOAPI_NOINIT
HDassert(plist1);
HDassert(plist2);
+ HDassert(cmp_ret);
/* Check the number of properties */
- if(plist1->nprops < plist2->nprops) HGOTO_DONE(-1);
- if(plist1->nprops > plist2->nprops) HGOTO_DONE(1);
+ if(plist1->nprops < plist2->nprops) {
+ *cmp_ret = -1;
+ HGOTO_DONE(SUCCEED);
+ } /* end if */
+ if(plist1->nprops > plist2->nprops) {
+ *cmp_ret = 1;
+ HGOTO_DONE(SUCCEED);
+ } /* end if */
/* Check whether they've been initialized */
- if(plist1->class_init < plist2->class_init) HGOTO_DONE(-1);
- if(plist1->class_init > plist2->class_init) HGOTO_DONE(1);
-
- /* Check for identical deleted properties */
- if(H5SL_count(plist1->del) > 0) {
- /* Check for no deleted properties in plist2 */
- if(H5SL_count(plist2->del) == 0) HGOTO_DONE(1);
-
- tnode1 = H5SL_first(plist1->del);
- tnode2 = H5SL_first(plist2->del);
- while(tnode1 || tnode2) {
- const char *name1, *name2; /* Name for node */
-
- /* Check if they both have properties in this node */
- if(tnode1 == NULL && tnode2 != NULL) HGOTO_DONE(-1);
- if(tnode1 != NULL && tnode2 == NULL) HGOTO_DONE(1);
-
- /* Compare the two deleted properties */
- name1 = (const char *)H5SL_item(tnode1);
- name2 = (const char *)H5SL_item(tnode2);
- if((cmp_value = HDstrcmp(name1, name2)) != 0)
- HGOTO_DONE(cmp_value);
-
- /* Advance the pointers */
- tnode1 = H5SL_next(tnode1);
- tnode2 = H5SL_next(tnode2);
- } /* end while */
+ if(plist1->class_init < plist2->class_init) {
+ *cmp_ret = -1;
+ HGOTO_DONE(SUCCEED);
} /* end if */
- else
- if(H5SL_count(plist2->del) > 0) HGOTO_DONE (-1);
-
- /* Cycle through the changed properties and compare them also */
- if(H5SL_count(plist1->props) > 0) {
- /* Check for no changed properties in plist2 */
- if(H5SL_count(plist2->props) == 0) HGOTO_DONE(1);
-
- tnode1 = H5SL_first(plist1->props);
- tnode2 = H5SL_first(plist2->props);
- while(tnode1 || tnode2) {
- H5P_genprop_t *prop1, *prop2; /* Property for node */
-
- /* Check if they both have properties in this node */
- if(tnode1 == NULL && tnode2 != NULL) HGOTO_DONE(-1);
- if(tnode1 != NULL && tnode2 == NULL) HGOTO_DONE(1);
-
- /* Compare the two properties */
- prop1 = (H5P_genprop_t *)H5SL_item(tnode1);
- prop2 = (H5P_genprop_t *)H5SL_item(tnode2);
- if((cmp_value = H5P_cmp_prop(prop1, prop2)) != 0)
- HGOTO_DONE(cmp_value);
-
- /* Advance the pointers */
- tnode1 = H5SL_next(tnode1);
- tnode2 = H5SL_next(tnode2);
- } /* end while */
+ if(plist1->class_init > plist2->class_init) {
+ *cmp_ret = 1;
+ HGOTO_DONE(SUCCEED);
+ } /* end if */
+
+ /* Set up iterator callback info */
+ udata.cmp_value = 0;
+ udata.plist2 = plist2;
+
+ /* Iterate over properties in first property list */
+ if((ret_value = H5P_iterate_plist(plist1, TRUE, &idx, H5P__cmp_plist_cb, &udata)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over list")
+ if(ret_value != 0) {
+ *cmp_ret = udata.cmp_value;
+ HGOTO_DONE(SUCCEED);
} /* end if */
- else
- if(H5SL_count(plist2->props)>0) HGOTO_DONE (-1);
/* Check the parent classes */
- if((cmp_value = H5P_cmp_class(plist1->pclass, plist2->pclass)) != 0)
- HGOTO_DONE(cmp_value);
+ if((*cmp_ret = H5P_cmp_class(plist1->pclass, plist2->pclass)) != 0)
+ HGOTO_DONE(SUCCEED);
+
+ /* Property lists must be equal, set comparison value to 0 */
+ *cmp_ret = 0;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -3366,7 +3408,7 @@ H5P__iterate_plist_cb(void *_item, void *_key, void *_udata)
H5P_genprop_t *item = (H5P_genprop_t *)_item; /* Pointer to the property */
char *key = (char *)_key; /* Pointer to the property's name */
H5P_iter_plist_ud_t *udata = (H5P_iter_plist_ud_t *)_udata; /* Pointer to user data */
- int ret_value = 0; /* Return value */
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC
@@ -3385,9 +3427,9 @@ H5P__iterate_plist_cb(void *_item, void *_key, void *_udata)
/* Increment the current index */
(*udata->curr_idx_ptr)++;
- /* Add property name to "seen" list */
+ /* Add property name to 'seen' list */
if(H5SL_insert(udata->seen, key, key) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into seen skip list")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert property into 'seen' skip list")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -3420,7 +3462,7 @@ H5P__iterate_plist_pclass_cb(void *_item, void *_key, void *_udata)
H5P_genprop_t *item = (H5P_genprop_t *)_item; /* Pointer to the property */
char *key = (char *)_key; /* Pointer to the property's name */
H5P_iter_plist_ud_t *udata = (H5P_iter_plist_ud_t *)_udata; /* Pointer to user data */
- int ret_value = 0; /* Return value */
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -3665,7 +3707,7 @@ H5P_iterate_pclass(const H5P_genclass_t *pclass, int *idx,
int curr_idx = 0; /* Current iteration index */
int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Sanity check */
HDassert(pclass);
diff --git a/src/H5Plapl.c b/src/H5Plapl.c
index 8d8ee15..0697130 100644
--- a/src/H5Plapl.c
+++ b/src/H5Plapl.c
@@ -48,6 +48,7 @@
/* Definitions for number of soft links to traverse */
#define H5L_ACS_NLINKS_SIZE sizeof(size_t)
#define H5L_ACS_NLINKS_DEF H5L_NUM_LINKS /*max symlinks to follow per lookup */
+
/* Definitions for external link prefix */
#define H5L_ACS_ELINK_PREFIX_SIZE sizeof(char *)
#define H5L_ACS_ELINK_PREFIX_DEF NULL /*default is no prefix */
@@ -297,8 +298,12 @@ H5P_lacc_elink_fapl_cmp(const void *value1, const void *value2, size_t UNUSED si
/* Check for NULL property lists */
if(obj1 == NULL && obj2 != NULL) HGOTO_DONE(1);
if(obj1 != NULL && obj2 == NULL) HGOTO_DONE(-1);
- if(obj1 && obj2)
- ret_value = H5P_cmp_plist(obj1, obj2);
+ if(obj1 && obj2) {
+ herr_t status;
+
+ status = H5P_cmp_plist(obj1, obj2, &ret_value);
+ HDassert(status >= 0);
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index 024f79b..5eba335 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -54,7 +54,7 @@
#define H5O_CRT_OHDR_FLAGS_SIZE sizeof(uint8_t)
/* Definitions for filter pipeline */
#define H5O_CRT_PIPELINE_SIZE sizeof(H5O_pline_t)
-#define H5O_CRT_PIPELINE_CMP H5P_ocrt_pipeline_cmp
+#define H5O_CRT_PIPELINE_CMP H5P__ocrt_pipeline_cmp
/******************/
@@ -72,12 +72,12 @@
/********************/
/* Property class callbacks */
-static herr_t H5P_ocrt_reg_prop(H5P_genclass_t *pclass);
-static herr_t H5P_ocrt_copy(hid_t new_plist_t, hid_t old_plist_t, void *copy_data);
-static herr_t H5P_ocrt_close(hid_t dxpl_id, void *close_data);
+static herr_t H5P__ocrt_reg_prop(H5P_genclass_t *pclass);
+static herr_t H5P__ocrt_copy(hid_t new_plist_t, hid_t old_plist_t, void *copy_data);
+static herr_t H5P__ocrt_close(hid_t dxpl_id, void *close_data);
/* Property callbacks */
-static int H5P_ocrt_pipeline_cmp(const void *value1, const void *value2, size_t size);
+static int H5P__ocrt_pipeline_cmp(const void *value1, const void *value2, size_t size);
/*********************/
@@ -91,12 +91,12 @@ const H5P_libclass_t H5P_CLS_OCRT[1] = {{
&H5P_CLS_ROOT_g, /* Parent class ID */
&H5P_CLS_OBJECT_CREATE_g, /* Pointer to class ID */
NULL, /* Pointer to default property list ID */
- H5P_ocrt_reg_prop, /* Default property registration routine */
+ H5P__ocrt_reg_prop, /* Default property registration routine */
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
- H5P_ocrt_copy, /* Class copy callback */
+ H5P__ocrt_copy, /* Class copy callback */
NULL, /* Class copy callback info */
- H5P_ocrt_close, /* Class close callback */
+ H5P__ocrt_close, /* Class close callback */
NULL /* Class close callback info */
}};
@@ -114,7 +114,7 @@ const H5P_libclass_t H5P_CLS_OCRT[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5P_ocrt_reg_prop
+ * Function: H5P__ocrt_reg_prop
*
* Purpose: Initialize the object creation property list class
*
@@ -126,7 +126,7 @@ const H5P_libclass_t H5P_CLS_OCRT[1] = {{
*-------------------------------------------------------------------------
*/
static herr_t
-H5P_ocrt_reg_prop(H5P_genclass_t *pclass)
+H5P__ocrt_reg_prop(H5P_genclass_t *pclass)
{
unsigned attr_max_compact = H5O_CRT_ATTR_MAX_COMPACT_DEF; /* Default max. compact attribute storage settings */
unsigned attr_min_dense = H5O_CRT_ATTR_MIN_DENSE_DEF; /* Default min. dense attribute storage settings */
@@ -134,7 +134,7 @@ H5P_ocrt_reg_prop(H5P_genclass_t *pclass)
H5O_pline_t pline = H5O_CRT_PIPELINE_DEF; /* Default I/O pipeline setting */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Register max. compact attribute storage property */
if(H5P_register_real(pclass, H5O_CRT_ATTR_MAX_COMPACT_NAME, H5O_CRT_ATTR_MAX_COMPACT_SIZE, &attr_max_compact, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
@@ -150,15 +150,15 @@ H5P_ocrt_reg_prop(H5P_genclass_t *pclass)
/* Register the pipeline property */
if(H5P_register_real(pclass, H5O_CRT_PIPELINE_NAME, H5O_CRT_PIPELINE_SIZE, &pline, NULL, NULL, NULL, NULL, NULL, H5O_CRT_PIPELINE_CMP, NULL) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_ocrt_reg_prop() */
+} /* end H5P__ocrt_reg_prop() */
/*-------------------------------------------------------------------------
- * Function: H5P_ocrt_copy
+ * Function: H5P__ocrt_copy
*
* Purpose: Callback routine which is called whenever any object
* creation property list is copied. This routine copies
@@ -174,14 +174,14 @@ done:
*/
/* ARGSUSED */
static herr_t
-H5P_ocrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data)
+H5P__ocrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data)
{
H5O_pline_t src_pline, dst_pline; /* Source & destination pipelines */
H5P_genplist_t *src_plist; /* Pointer to source property list */
H5P_genplist_t *dst_plist; /* Pointer to destination property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Verify property list IDs */
if(NULL == (dst_plist = (H5P_genplist_t *)H5I_object(dst_plist_id)))
@@ -203,11 +203,11 @@ H5P_ocrt_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_ocrt_copy() */
+} /* end H5P__ocrt_copy() */
/*-------------------------------------------------------------------------
- * Function: H5P_ocrt_close
+ * Function: H5P__ocrt_close
*
* Purpose: Callback routine which is called whenever any object create
* property list is closed. This routine performs any generic
@@ -223,13 +223,13 @@ done:
*/
/* ARGSUSED */
static herr_t
-H5P_ocrt_close(hid_t dcpl_id, void UNUSED *close_data)
+H5P__ocrt_close(hid_t dcpl_id, void UNUSED *close_data)
{
H5O_pline_t pline; /* I/O pipeline */
H5P_genplist_t *plist; /* Property list */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments */
if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
@@ -245,7 +245,7 @@ H5P_ocrt_close(hid_t dcpl_id, void UNUSED *close_data)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_ocrt_close() */
+} /* end H5P__ocrt_close() */
/*-------------------------------------------------------------------------
@@ -1330,7 +1330,7 @@ H5P_get_filter(const H5Z_filter_info_t *filter, unsigned int *flags/*out*/,
/*-------------------------------------------------------------------------
- * Function: H5P_ocrt_pipeline_cmp
+ * Function: H5P__ocrt_pipeline_cmp
*
* Purpose: Callback routine which is called whenever a filter pipeline
* property in a property list is compared.
@@ -1345,24 +1345,20 @@ H5P_get_filter(const H5Z_filter_info_t *filter, unsigned int *flags/*out*/,
*-------------------------------------------------------------------------
*/
static int
-H5P_ocrt_pipeline_cmp(const void *_pline1, const void *_pline2, size_t UNUSED size)
+H5P__ocrt_pipeline_cmp(const void *_pline1, const void *_pline2, size_t UNUSED size)
{
const H5O_pline_t *pline1 = (const H5O_pline_t *)_pline1, /* Create local aliases for values */
*pline2 = (const H5O_pline_t *)_pline2;
int cmp_value; /* Value from comparison */
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(pline1);
HDassert(pline2);
HDassert(size == sizeof(H5O_pline_t));
- /* Check the number of allocated pipeline entries */
- if(pline1->nalloc < pline2->nalloc) HGOTO_DONE(-1);
- if(pline1->nalloc > pline2->nalloc) HGOTO_DONE(1);
-
/* Check the number of used pipeline entries */
if(pline1->nused < pline2->nused) HGOTO_DONE(-1);
if(pline1->nused > pline2->nused) HGOTO_DONE(1);
@@ -1412,7 +1408,7 @@ H5P_ocrt_pipeline_cmp(const void *_pline1, const void *_pline2, size_t UNUSED si
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_ocrt_pipeline_cmp() */
+} /* end H5P__ocrt_pipeline_cmp() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -1566,6 +1562,5 @@ H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags/*out*/
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_filter_by_id1() */
-
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c
index adea906..0ba5625 100644
--- a/src/H5Pocpypl.c
+++ b/src/H5Pocpypl.c
@@ -52,11 +52,14 @@
/* Definitions for merge committed dtype list */
#define H5O_CPY_MERGE_COMM_DT_LIST_SIZE sizeof(char *)
#define H5O_CPY_MERGE_COMM_DT_LIST_DEF NULL
-#define H5O_CPY_MERGE_COMM_DT_LIST_CMP H5P_ocpy_merge_comm_dt_list_cmp
+#define H5O_CPY_MERGE_COMM_DT_LIST_COPY H5P__ocpy_merge_comm_dt_list_copy
+#define H5O_CPY_MERGE_COMM_DT_LIST_CMP H5P__ocpy_merge_comm_dt_list_cmp
+#define H5O_CPY_MERGE_COMM_DT_LIST_CLOSE H5P__ocpy_merge_comm_dt_list_close
/* Definitions for callback function when completing the search for a matching committed datatype from the committed dtype list */
#define H5O_CPY_MCDT_SEARCH_CB_SIZE sizeof(H5O_mcdt_cb_info_t)
#define H5O_CPY_MCDT_SEARCH_CB_DEF {NULL,NULL}
+
/******************/
/* Local Typedefs */
/******************/
@@ -72,16 +75,15 @@
/********************/
/* General routines */
-static H5O_copy_dtype_merge_list_t *H5P_free_merge_comm_dtype_list(H5O_copy_dtype_merge_list_t *dt_list);
+static H5O_copy_dtype_merge_list_t *H5P__free_merge_comm_dtype_list(H5O_copy_dtype_merge_list_t *dt_list);
/* Property class callbacks */
-static herr_t H5P_ocpy_reg_prop(H5P_genclass_t *pclass);
-static herr_t H5P_ocpy_copy(hid_t dst_plist_id, hid_t src_plist_id,
- void *copy_data);
-static herr_t H5P_ocpy_close(hid_t ocpypl_id, void *close_data);
+static herr_t H5P__ocpy_reg_prop(H5P_genclass_t *pclass);
/* Property callbacks */
-static int H5P_ocpy_merge_comm_dt_list_cmp(const void *value1, const void *value2, size_t size);
+static herr_t H5P__ocpy_merge_comm_dt_list_copy(const char* name, size_t size, void* value);
+static int H5P__ocpy_merge_comm_dt_list_cmp(const void *value1, const void *value2, size_t size);
+static herr_t H5P__ocpy_merge_comm_dt_list_close(const char* name, size_t size, void* value);
/*********************/
@@ -95,12 +97,12 @@ const H5P_libclass_t H5P_CLS_OCPY[1] = {{
&H5P_CLS_ROOT_g, /* Parent class ID */
&H5P_CLS_OBJECT_COPY_g, /* Pointer to class ID */
&H5P_LST_OBJECT_COPY_g, /* Pointer to default property list ID */
- H5P_ocpy_reg_prop, /* Default property registration routine */
+ H5P__ocpy_reg_prop, /* Default property registration routine */
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
- H5P_ocpy_copy, /* Class copy callback */
+ NULL, /* Class copy callback */
NULL, /* Class copy callback info */
- H5P_ocpy_close, /* Class close callback */
+ NULL, /* Class close callback */
NULL /* Class close callback info */
}};
@@ -120,7 +122,7 @@ H5FL_DEFINE(H5O_copy_dtype_merge_list_t);
/*-------------------------------------------------------------------------
- * Function: H5P_ocpy_reg_prop
+ * Function: H5P__ocpy_reg_prop
*
* Purpose: Initialize the object copy property list class
*
@@ -131,21 +133,21 @@ H5FL_DEFINE(H5O_copy_dtype_merge_list_t);
*-------------------------------------------------------------------------
*/
static herr_t
-H5P_ocpy_reg_prop(H5P_genclass_t *pclass)
+H5P__ocpy_reg_prop(H5P_genclass_t *pclass)
{
unsigned ocpy_option = H5O_CPY_OPTION_DEF; /* Default object copy flags */
H5O_copy_dtype_merge_list_t *merge_comm_dtype_list = H5O_CPY_MERGE_COMM_DT_LIST_DEF; /* Default merge committed dtype list */
H5O_mcdt_cb_info_t mcdt_cb = H5O_CPY_MCDT_SEARCH_CB_DEF; /* Default callback before searching the global list of committed datatypes at destination */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Register copy options property */
if(H5P_register_real(pclass, H5O_CPY_OPTION_NAME, H5O_CPY_OPTION_SIZE, &ocpy_option, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
/* Register merge named dtype list property */
- if(H5P_register_real(pclass, H5O_CPY_MERGE_COMM_DT_LIST_NAME, H5O_CPY_MERGE_COMM_DT_LIST_SIZE, &merge_comm_dtype_list, NULL, NULL, NULL, NULL, NULL, H5O_CPY_MERGE_COMM_DT_LIST_CMP, NULL) < 0)
+ if(H5P_register_real(pclass, H5O_CPY_MERGE_COMM_DT_LIST_NAME, H5O_CPY_MERGE_COMM_DT_LIST_SIZE, &merge_comm_dtype_list, NULL, NULL, NULL, NULL, H5O_CPY_MERGE_COMM_DT_LIST_COPY, H5O_CPY_MERGE_COMM_DT_LIST_CMP, H5O_CPY_MERGE_COMM_DT_LIST_CLOSE) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
/* Register property for callback when completing the search for a matching named datatype from the named dtype list */
@@ -154,47 +156,68 @@ H5P_ocpy_reg_prop(H5P_genclass_t *pclass)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_ocpy_reg_prop() */
+} /* end H5P__ocpy_reg_prop() */
/*-------------------------------------------------------------------------
- * Function: H5P_ocpy_copy
- *
- * Purpose: Callback routine which is called whenever any object
- * copy property list is copied. This routine copies
- * the properties from the old list to the new list.
+ * Function: H5P__free_merge_comm_dtype_list
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Purpose: Frees the provided merge named dtype list
*
- * Programmer: Neil Fortner
- * Friday, October 28, 2011
+ * Return: NULL
*
+ * Programmer: Neil Fortner
+ * October 27, 2011
*-------------------------------------------------------------------------
*/
+static H5O_copy_dtype_merge_list_t *
+H5P__free_merge_comm_dtype_list(H5O_copy_dtype_merge_list_t *dt_list)
+{
+ H5O_copy_dtype_merge_list_t *tmp_node;
+
+ FUNC_ENTER_STATIC_NOERR
+
+ /* Free the list */
+ while(dt_list) {
+ tmp_node = dt_list->next;
+ (void)H5MM_xfree(dt_list->path);
+ (void)H5FL_FREE(H5O_copy_dtype_merge_list_t, dt_list);
+ dt_list = tmp_node;
+ } /* end while */
+
+ FUNC_LEAVE_NOAPI(NULL);
+} /* H5P__free_merge_comm_dtype_list */
+
+
+/*--------------------------------------------------------------------------
+ * Function: H5P__ocpy_merge_comm_dt_list_copy
+ *
+ * Purpose: Copy the merge committed datatype list
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * Friday, August 31, 2012
+ *
+ *--------------------------------------------------------------------------
+ */
/* ARGSUSED */
static herr_t
-H5P_ocpy_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data)
+H5P__ocpy_merge_comm_dt_list_copy(const char UNUSED *name, size_t UNUSED size,
+ void *value)
{
- H5O_copy_dtype_merge_list_t *src_dt_list, *dst_dt_list = NULL; /* Source & destination merge named datatype lists */
+ const H5O_copy_dtype_merge_list_t *src_dt_list; /* Source merge named datatype lists */
+ H5O_copy_dtype_merge_list_t *dst_dt_list = NULL; /* Destination merge named datatype lists */
H5O_copy_dtype_merge_list_t *dst_dt_list_tail = NULL, *tmp_dt_list = NULL; /* temporary merge named datatype lists */
- H5P_genplist_t *src_plist; /* Pointer to source property list */
- H5P_genplist_t *dst_plist; /* Pointer to destination property list */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
- /* Verify property list IDs */
- if(NULL == (dst_plist = (H5P_genplist_t *)H5I_object(dst_plist_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object copy property list")
- if(NULL == (src_plist = (H5P_genplist_t *)H5I_object(src_plist_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object copy property list")
-
- /* Get the merge committed dtype list property from the old property list */
- if(H5P_get(src_plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &src_dt_list) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge named dtype list")
+ HDassert(value);
/* Make copy of merge committed dtype list */
+ src_dt_list = *(const H5O_copy_dtype_merge_list_t **)value;
while(src_dt_list) {
/* Copy src_dt_list */
if(NULL == (tmp_dt_list = H5FL_CALLOC(H5O_copy_dtype_merge_list_t)))
@@ -217,14 +240,12 @@ H5P_ocpy_copy(hid_t dst_plist_id, hid_t src_plist_id, void UNUSED *copy_data)
src_dt_list = src_dt_list->next;
} /* end while */
- /* Set the merge named dtype list property for the destination property list
- */
- if(H5P_set(dst_plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &dst_dt_list) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set merge committed dtype list")
+ /* Set the merge named dtype list property for the destination property list */
+ *(H5O_copy_dtype_merge_list_t **)value = dst_dt_list;
done:
if(ret_value < 0) {
- dst_dt_list = H5P_free_merge_comm_dtype_list(dst_dt_list);
+ dst_dt_list = H5P__free_merge_comm_dtype_list(dst_dt_list);
if(tmp_dt_list) {
tmp_dt_list->path = (char *)H5MM_xfree(tmp_dt_list->path);
tmp_dt_list = H5FL_FREE(H5O_copy_dtype_merge_list_t, tmp_dt_list);
@@ -232,53 +253,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_ocpy_copy() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5P_ocpy_close
- *
- * Purpose: Callback routine which is called whenever any object copy
- * property list is closed. This routine performs any generic
- * cleanup needed on the properties the library put into the
- * list.
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Neil Fortner
- * Friday, October 28, 2011
- *
- *-------------------------------------------------------------------------
- */
-/* ARGSUSED */
-static herr_t
-H5P_ocpy_close(hid_t ocpypl_id, void UNUSED *close_data)
-{
- H5O_copy_dtype_merge_list_t *dt_list; /* Merge named datatype list */
- H5P_genplist_t *plist; /* Property list */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT
-
- /* Check arguments */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(ocpypl_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object copy property list")
-
- /* Get the merge named dtype list property from the old property list */
- if(H5P_get(plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &dt_list) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge named dtype list")
-
- /* Free the merge named dtype list */
- dt_list = H5P_free_merge_comm_dtype_list(dt_list);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_ocpy_close() */
+} /* end H5P__ocpy_merge_comm_dt_list_copy() */
/*-------------------------------------------------------------------------
- * Function: H5P_ocpy_merge_comm_dt_list_cmp
+ * Function: H5P__ocpy_merge_comm_dt_list_cmp
*
* Purpose: Callback routine which is called whenever the merge
* named dtype property in the object copy property list
@@ -294,14 +273,14 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5P_ocpy_merge_comm_dt_list_cmp(const void *_dt_list1, const void *_dt_list2,
+H5P__ocpy_merge_comm_dt_list_cmp(const void *_dt_list1, const void *_dt_list2,
size_t UNUSED size)
{
const H5O_copy_dtype_merge_list_t *dt_list1 = *(H5O_copy_dtype_merge_list_t * const *)_dt_list1, /* Create local aliases for values */
*dt_list2 = *(H5O_copy_dtype_merge_list_t * const *)_dt_list2;
herr_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(_dt_list1);
@@ -326,37 +305,35 @@ H5P_ocpy_merge_comm_dt_list_cmp(const void *_dt_list1, const void *_dt_list2,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_ocpy_merge_comm_dt_list_cmp() */
+} /* end H5P__ocpy_merge_comm_dt_list_cmp() */
-/*-------------------------------------------------------------------------
- * Function: H5P_free_merge_comm_dtype_list
+/*--------------------------------------------------------------------------
+ * Function: H5P__ocpy_merge_comm_dt_list_close
*
- * Purpose: Frees the provided merge named dtype list
+ * Purpose: Close the merge common datatype list property
*
- * Return: NULL
+ * Return: Success: Non-negative
+ * Failure: Negative
*
- * Programmer: Neil Fortner
- * October 27, 2011
- *-------------------------------------------------------------------------
+ * Programmer: Quincey Koziol
+ * Friday, August 31, 2012
+ *
+ *---------------------------------------------------------------------------
*/
-static H5O_copy_dtype_merge_list_t *
-H5P_free_merge_comm_dtype_list(H5O_copy_dtype_merge_list_t *dt_list)
+/* ARGSUSED */
+static herr_t
+H5P__ocpy_merge_comm_dt_list_close(const char UNUSED *name, size_t UNUSED size, void *value)
{
- H5O_copy_dtype_merge_list_t *tmp_node;
+ FUNC_ENTER_STATIC_NOERR
- FUNC_ENTER_NOAPI_NOINIT
+ HDassert(value);
- /* Free the list */
- while(dt_list) {
- tmp_node = dt_list->next;
- (void)H5MM_xfree(dt_list->path);
- (void)H5FL_FREE(H5O_copy_dtype_merge_list_t, dt_list);
- dt_list = tmp_node;
- } /* end while */
+ /* Free the merge named dtype list */
+ H5P__free_merge_comm_dtype_list(*(H5O_copy_dtype_merge_list_t **)value);
- FUNC_LEAVE_NOAPI(NULL);
-} /* H5P_free_merge_comm_dtype_list */
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5P__ocpy_merge_comm_dt_list_close() */
/*-------------------------------------------------------------------------
@@ -541,7 +518,7 @@ H5Pfree_merge_committed_dtype_paths(hid_t plist_id)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get merge committed dtype list")
/* Free dtype list */
- dt_list = H5P_free_merge_comm_dtype_list(dt_list);
+ dt_list = H5P__free_merge_comm_dtype_list(dt_list);
/* Update the list stored in the property list (to NULL) */
if(H5P_set(plist, H5O_CPY_MERGE_COMM_DT_LIST_NAME, &dt_list) < 0)
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h
index 803abfd..7768eec 100644
--- a/src/H5Ppkg.h
+++ b/src/H5Ppkg.h
@@ -171,14 +171,15 @@ H5_DLL herr_t H5P_register(H5P_genclass_t **pclass, const char *name, size_t siz
H5_DLL herr_t H5P_add_prop(H5SL_t *props, H5P_genprop_t *prop);
H5_DLL herr_t H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod);
H5_DLL htri_t H5P_exist_pclass(H5P_genclass_t *pclass, const char *name);
-H5_DLL herr_t H5P_get_size_plist(H5P_genplist_t *plist, const char *name,
+H5_DLL herr_t H5P_get_size_plist(const H5P_genplist_t *plist, const char *name,
size_t *size);
H5_DLL herr_t H5P_get_size_pclass(H5P_genclass_t *pclass, const char *name,
size_t *size);
H5_DLL H5P_genclass_t *H5P_get_class(const H5P_genplist_t *plist);
H5_DLL herr_t H5P_get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops);
H5_DLL int H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2);
-H5_DLL int H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2);
+H5_DLL herr_t H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2,
+ int *cmp_ret);
H5_DLL int H5P_iterate_plist(const H5P_genplist_t *plist, hbool_t iter_all_prop,
int *idx, H5P_iterate_int_t iter_func, void *iter_data);
H5_DLL int H5P_iterate_pclass(const H5P_genclass_t *pclass, int *idx,
@@ -193,7 +194,7 @@ H5_DLL herr_t H5P_close_class(void *_pclass);
H5_DLL herr_t H5P_get_filter(const H5Z_filter_info_t *filter,
unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[],
size_t namelen, char name[], unsigned *filter_config);
-H5_DLL H5P_genprop_t *H5P__find_prop_plist(H5P_genplist_t *plist, const char *name);
+H5_DLL H5P_genprop_t *H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name);
/* Testing functions */
#ifdef H5P_TESTING
diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h
index 0332079..9dc43e6 100644
--- a/src/H5Pprivate.h
+++ b/src/H5Pprivate.h
@@ -89,7 +89,7 @@ H5_DLL herr_t H5P_insert(H5P_genplist_t *plist, const char *name, size_t size,
H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy,
H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close);
H5_DLL herr_t H5P_remove(hid_t plist_id, H5P_genplist_t *plist, const char *name);
-H5_DLL htri_t H5P_exist_plist(H5P_genplist_t *plist, const char *name);
+H5_DLL htri_t H5P_exist_plist(const H5P_genplist_t *plist, const char *name);
H5_DLL char *H5P_get_class_name(H5P_genclass_t *pclass);
H5_DLL herr_t H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops,
hbool_t recurse);
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index 38753da..c50d852 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -153,6 +153,19 @@ typedef enum H5D_mpio_actual_io_mode_t {
H5D_MPIO_CONTIGUOUS_COLLECTIVE = 0x4
} H5D_mpio_actual_io_mode_t;
+/* Broken collective IO property */
+typedef enum H5D_mpio_no_collective_cause_t {
+ H5D_MPIO_COLLECTIVE = 0x00,
+ H5D_MPIO_SET_INDEPENDENT = 0x01,
+ H5D_MPIO_DATATYPE_CONVERSION = 0x02,
+ H5D_MPIO_DATA_TRANSFORMS = 0x04,
+ H5D_MPIO_SET_MPIPOSIX = 0x08,
+ H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10,
+ H5D_MPIO_POINT_SELECTIONS = 0x20,
+ H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x40,
+ H5D_MPIO_FILTERS = 0x80
+} H5D_mpio_no_collective_cause_t;
+
/********************/
/* Public Variables */
/********************/
@@ -407,6 +420,7 @@ H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, voi
#ifdef H5_HAVE_PARALLEL
H5_DLL herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode);
H5_DLL herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode);
+H5_DLL herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, uint32_t *global_no_collective_cause);
#endif /* H5_HAVE_PARALLEL */
/* Link creation property list (LCPL) routines */
diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c
index 8573985..505e35f 100644
--- a/src/H5Pstrcpl.c
+++ b/src/H5Pstrcpl.c
@@ -63,7 +63,7 @@
/********************/
/* Property class callbacks */
-static herr_t H5P_strcrt_reg_prop(H5P_genclass_t *pclass);
+static herr_t H5P__strcrt_reg_prop(H5P_genclass_t *pclass);
/*********************/
@@ -77,7 +77,7 @@ const H5P_libclass_t H5P_CLS_STRCRT[1] = {{
&H5P_CLS_ROOT_g, /* Parent class ID */
&H5P_CLS_STRING_CREATE_g, /* Pointer to class ID */
NULL, /* Pointer to default property list ID */
- H5P_strcrt_reg_prop, /* Default property registration routine */
+ H5P__strcrt_reg_prop, /* Default property registration routine */
NULL, /* Class creation callback */
NULL, /* Class creation callback info */
NULL, /* Class copy callback */
@@ -99,9 +99,9 @@ const H5P_libclass_t H5P_CLS_STRCRT[1] = {{
/*-------------------------------------------------------------------------
- * Function: H5P_strcrt_reg_prop
+ * Function: H5P__strcrt_reg_prop
*
- * Purpose: Register the dataset creation property list class's properties
+ * Purpose: Register the string creation property list class's properties
*
* Return: Non-negative on success/Negative on failure
*
@@ -110,41 +110,38 @@ const H5P_libclass_t H5P_CLS_STRCRT[1] = {{
*-------------------------------------------------------------------------
*/
static herr_t
-H5P_strcrt_reg_prop(H5P_genclass_t *pclass)
+H5P__strcrt_reg_prop(H5P_genclass_t *pclass)
{
H5T_cset_t char_encoding = H5P_STRCRT_CHAR_ENCODING_DEF; /* Default character set encoding */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
/* Register character encoding */
if(H5P_register_real(pclass, H5P_STRCRT_CHAR_ENCODING_NAME, H5P_STRCRT_CHAR_ENCODING_SIZE, &char_encoding, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_strcrt_reg_prop() */
+} /* end H5P__strcrt_reg_prop() */
/*-------------------------------------------------------------------------
- * Function: H5Pset_char_encoding
+ * Function: H5Pset_char_encoding
*
- * Purpose: Sets the character encoding of the string.
+ * Purpose: Sets the character encoding of the string.
*
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: James Laird
- * Wednesday, October 26, 2005
- *
- * Modifications:
+ * Return: Non-negative on success/Negative on failure
*
+ * Programmer: James Laird
+ * Wednesday, October 26, 2005
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding)
{
H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iTc", plist_id, encoding);
@@ -154,7 +151,7 @@ H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "character encoding is not valid")
/* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id,H5P_STRING_CREATE)))
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Set the character encoding */
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h
index c2d6f7e..c1528b3 100644
--- a/src/H5Zprivate.h
+++ b/src/H5Zprivate.h
@@ -103,6 +103,6 @@ H5_DLL herr_t H5Z_xform_destroy(H5Z_data_xform_t *data_xform_prop);
H5_DLL herr_t H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array,
size_t array_size, const H5T_t *buf_type);
H5_DLL hbool_t H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop);
-H5_DLL char* H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop);
+H5_DLL const char *H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop);
#endif
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 9fa3863..498db03 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -1732,11 +1732,9 @@ H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop)
*
*-------------------------------------------------------------------------
*/
-char *
+const char *
H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop)
{
- char* ret_value;
-
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* There should be no way that this can be NULL since the function
@@ -1744,8 +1742,6 @@ H5Z_xform_extract_xform_str(const H5Z_data_xform_t *data_xform_prop)
* pasing them */
assert(data_xform_prop);
- ret_value = data_xform_prop->xform_exp;
-
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(data_xform_prop->xform_exp)
} /* H5Z_xform_extract_xform_str() */
diff --git a/src/H5public.h b/src/H5public.h
index 193aae1..7e17461 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 128 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 131 /* 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.128" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.131" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
diff --git a/src/H5trace.c b/src/H5trace.c
index b559669..2dab8ec 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -535,6 +535,60 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
} /* end else */
break;
+ case 'n':
+ if(ptr) {
+ if(vp)
+ fprintf(out, "0x%lx", (unsigned long)vp);
+ else
+ fprintf(out, "NULL");
+ } /* end if */
+ else {
+ H5D_mpio_no_collective_cause_t nocol_cause_mode = (H5D_mpio_no_collective_cause_t)va_arg(ap, int);
+
+ switch(nocol_cause_mode) {
+ case H5D_MPIO_COLLECTIVE:
+ fprintf(out, "H5D_MPIO_COLLECTIVE");
+ break;
+
+ case H5D_MPIO_SET_INDEPENDENT:
+ fprintf(out, "H5D_MPIO_SET_INDEPENDENT");
+ break;
+
+ case H5D_MPIO_DATATYPE_CONVERSION:
+ fprintf(out, "H5D_MPIO_DATATYPE_CONVERSION");
+ break;
+
+ case H5D_MPIO_DATA_TRANSFORMS:
+ fprintf(out, "H5D_MPIO_DATA_TRANSFORMS");
+ break;
+
+ case H5D_MPIO_SET_MPIPOSIX:
+ fprintf(out, "H5D_MPIO_SET_MPIPOSIX");
+ break;
+
+ case H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES:
+ fprintf(out, "H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES");
+ break;
+
+ case H5D_MPIO_POINT_SELECTIONS:
+ fprintf(out, "H5D_MPIO_POINT_SELECTIONS");
+ break;
+
+ case H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET:
+ fprintf(out, "H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET");
+ break;
+
+ case H5D_MPIO_FILTERS:
+ fprintf(out, "H5D_MPIO_FILTERS");
+ break;
+
+ default:
+ fprintf(out, "%ld", (long)nocol_cause_mode);
+ break;
+ } /* end switch */
+ } /* end else */
+ break;
+
case 'o':
if(ptr) {
if(vp)
diff --git a/src/Makefile.in b/src/Makefile.in
index 137d527..be46622 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -522,7 +522,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 = 118
+LT_VERS_REVISION = 121
LT_VERS_AGE = 0
H5detect_CFLAGS = -g $(AM_CFLAGS)