change H5F_CLOSE_SEMI -> H5F_CLOSE_WEAK for nc4_create_file as well

The nc_sync test fails if the settings are different for file creation
and opening.
This commit is contained in:
Tobias Kölling 2020-09-02 20:02:08 +02:00
parent 9f8897762d
commit a3b753d764

View File

@ -121,11 +121,12 @@ nc4_create_file(const char *path, int cmode, size_t initialsz,
}
/* Need this access plist to control how HDF5 handles open objects
* on file close. Setting H5F_CLOSE_SEMI will cause H5Fclose to
* fail if there are any open objects in the file. */
* on file close. (Setting H5F_CLOSE_WEAK will cause H5Fclose not to
* fail if there are any open objects in the file. This may happen when virtual
* datasets are opened). */
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
BAIL(NC_EHDFERR);
if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_SEMI))
if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_WEAK))
BAIL(NC_EHDFERR);
#ifdef USE_PARALLEL4