mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-17 16:50:18 +08:00
Add hdf5 collective metadata api detection to cmake build
This commit is contained in:
parent
7c808e849b
commit
e0269d6cac
@ -663,6 +663,9 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
|
||||
SET(USE_PARALLEL_POSIX ON)
|
||||
ENDIF()
|
||||
|
||||
#Check to see if HDF5 library has collective metadata APIs, (HDF5 >= 1.10.0)
|
||||
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY} H5Pset_all_coll_metadata_ops "" HDF5_HAS_COLL_METADATA_OPS)
|
||||
|
||||
OPTION(ENABLE_DYNAMIC_LOADING "Enable Dynamic Loading" ON)
|
||||
IF(ENABLE_DYNAMIC_LOADING)
|
||||
SET(USE_LIBDL ON CACHE BOOL "")
|
||||
|
@ -97,6 +97,7 @@ are set when opening a binary file on Windows. */
|
||||
#cmakedefine USE_PARALLEL_MPIO 1
|
||||
#cmakedefine HDF5_HAS_H5FREE 1
|
||||
#cmakedefine HDF5_HAS_LIBVER_BOUNDS 1
|
||||
#cmakedefine HDF5_HAS_COLL_METADATA_OPS 1
|
||||
#cmakedefine HDF5_PARALLEL 1
|
||||
#cmakedefine USE_PARALLEL 1
|
||||
#cmakedefine USE_PARALLEL4 1
|
||||
|
@ -364,9 +364,10 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
|
||||
#endif /* EXTRA_TESTS */
|
||||
|
||||
#ifdef USE_PARALLEL4
|
||||
#ifdef HDF5_HAS_COLL_METADATA_OPS
|
||||
H5Pset_all_coll_metadata_ops(fapl_id, 1 );
|
||||
H5Pset_coll_metadata_write(fapl_id, 1);
|
||||
|
||||
#endif
|
||||
/* If this is a parallel file create, set up the file creation
|
||||
property list. */
|
||||
if ((cmode & NC_MPIIO) || (cmode & NC_MPIPOSIX))
|
||||
@ -2264,8 +2265,9 @@ nc4_open_file(const char *path, int mode, void* parameters, NC *nc)
|
||||
#endif
|
||||
|
||||
#ifdef USE_PARALLEL4
|
||||
#ifdef HDF5_HAS_COLL_METADATA_OPS
|
||||
H5Pset_all_coll_metadata_ops(fapl_id, 1 );
|
||||
|
||||
#endif
|
||||
/* If this is a parallel file create, set up the file creation
|
||||
property list. */
|
||||
if (mode & NC_MPIIO || mode & NC_MPIPOSIX)
|
||||
|
Loading…
Reference in New Issue
Block a user