Skip to content

Commit

Permalink
ange H5F_CLOSE_SEMI -> H5F_CLOSE_WEAK for netcdf related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
d70-t committed Sep 2, 2020
1 parent a3b753d commit 4b80965
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion nc_perf/tst_attsperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion nc_test4/tst_h_vl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion nc_test4/tst_interops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions nc_test4/tst_interops5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4b80965

Please sign in to comment.