mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-19 17:30:27 +08:00
Now use H5Literate2() instead of H5Literate() when its available
This commit is contained in:
parent
1aa2c6bbea
commit
c3ae3daf2d
@ -1618,13 +1618,13 @@ if test "x$enable_hdf5" = xyes; then
|
||||
# H5Pset_fapl_mpiposix and H5Pget_fapl_mpiposix have been removed since HDF5 1.8.12.
|
||||
# Use H5Pset_fapl_mpio and H5Pget_fapl_mpio, instead.
|
||||
|
||||
AC_CHECK_FUNCS([H5Pget_fapl_mpio H5Pset_deflate H5Z_SZIP H5Pset_all_coll_metadata_ops H5Literate])
|
||||
AC_CHECK_FUNCS([H5Pget_fapl_mpio H5Pset_deflate H5Z_SZIP H5Pset_all_coll_metadata_ops H5Literate H5Literate2])
|
||||
|
||||
# Check to see if HDF5 library has collective metadata APIs, (HDF5 >= 1.10.0)
|
||||
if test "x$ac_cv_func_H5Pset_all_coll_metadata_ops" = xyes; then
|
||||
AC_DEFINE([HDF5_HAS_COLL_METADATA_OPS], [1], [if true, use collective metadata ops in parallel netCDF-4])
|
||||
fi
|
||||
|
||||
|
||||
# If parallel is available in hdf5, enable it in the C code. Also add some stuff to netcdf.h.
|
||||
if test "x$ac_cv_func_H5Pget_fapl_mpio" = xyes -o "x$ac_cv_func_H5Pget_fapl_mpiposix" = xyes; then
|
||||
hdf5_parallel=yes
|
||||
|
@ -2857,9 +2857,15 @@ rec_read_metadata(NC_GRP_INFO_T *grp)
|
||||
* passed as a parameter to the callback function
|
||||
* read_hdf5_obj(). (I have also tried H5Oiterate(), but it is much
|
||||
* slower iterating over the same file - Ed.) */
|
||||
#ifdef HAVE_H5LITERATE2
|
||||
if (H5Literate2(hdf5_grp->hdf_grpid, iter_index, H5_ITER_INC, &idx,
|
||||
read_hdf5_obj, (void *)&udata) < 0)
|
||||
BAIL(NC_EHDFERR);
|
||||
#else
|
||||
if (H5Literate(hdf5_grp->hdf_grpid, iter_index, H5_ITER_INC, &idx,
|
||||
read_hdf5_obj, (void *)&udata) < 0)
|
||||
BAIL(NC_EHDFERR);
|
||||
#endif
|
||||
|
||||
/* Process the child groups found. (Deferred until now, so that the
|
||||
* types in the current group get processed and are available for
|
||||
|
Loading…
x
Reference in New Issue
Block a user