mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-17 16:50:18 +08:00
ange H5F_CLOSE_SEMI -> H5F_CLOSE_WEAK for netcdf related tests
This commit is contained in:
parent
a3b753d764
commit
4b80965491
@ -137,7 +137,7 @@ readfile_hdf5(char *file_name, long long *delta, int do_inq, int num_vars)
|
||||
|
||||
/* Open and close the root group. */
|
||||
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) ERR;
|
||||
if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_SEMI)) ERR;
|
||||
if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_WEAK)) ERR;
|
||||
if ((hdfid = H5Fopen(file_name, H5F_ACC_RDONLY, fapl_id)) < 0) ERR;
|
||||
if ((hdf_grpid = H5Gopen2(hdfid, "/", H5P_DEFAULT)) < 0) ERR;
|
||||
|
||||
|
@ -36,7 +36,7 @@ main()
|
||||
|
||||
/* Open the file and read the vlen data. */
|
||||
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) ERR;
|
||||
if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_SEMI)) ERR;
|
||||
if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_WEAK)) ERR;
|
||||
if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) ERR;
|
||||
|
||||
if ((fileid = H5Fopen(FILE_NAME, H5F_ACC_RDONLY, fapl_id)) < 0) ERR;
|
||||
|
@ -390,7 +390,7 @@ main(int argc, char **argv)
|
||||
/* Open the file with HDF5 while netcdf still has it open. */
|
||||
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) ERR;
|
||||
/* Turn this off for*/
|
||||
if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_SEMI)) ERR;
|
||||
if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_WEAK)) ERR;
|
||||
if ((fileid = H5Fopen(FILE_NAME, H5F_ACC_RDONLY, fapl_id)) < 0) ERR;
|
||||
if (H5Pclose(fapl_id) < 0) ERR;
|
||||
if (H5Fclose(fileid) < 0) ERR;
|
||||
|
@ -50,10 +50,10 @@ main(int argc, char **argv)
|
||||
yscaleDims[0] = ncolCur;
|
||||
if ((xdimSpaceId = H5Screate_simple(1, xscaleDims, NULL)) < 0) ERR;
|
||||
|
||||
/* With the SEMI close degree, the HDF5 file close will fail if
|
||||
/* With the WEAK close degree, the HDF5 file close will not fail if
|
||||
* anything is left open. */
|
||||
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) ERR;
|
||||
if (H5Pset_fclose_degree(fapl, H5F_CLOSE_SEMI)) ERR;
|
||||
if (H5Pset_fclose_degree(fapl, H5F_CLOSE_WEAK)) ERR;
|
||||
|
||||
/* Create file */
|
||||
if((fileId = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC,
|
||||
|
Loading…
Reference in New Issue
Block a user