From a3b753d764b73f3960bf92dfe93b1125c9775fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20K=C3=B6lling?= Date: Wed, 2 Sep 2020 20:02:08 +0200 Subject: [PATCH] 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. --- libhdf5/hdf5create.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libhdf5/hdf5create.c b/libhdf5/hdf5create.c index 27a99405c..747ee8acc 100644 --- a/libhdf5/hdf5create.c +++ b/libhdf5/hdf5create.c @@ -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