summaryrefslogtreecommitdiffstats
path: root/HDF5Examples/C/H5PAR/ph5example.c
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2024-02-15 16:19:52 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2024-02-16 17:53:12 (GMT)
commitb6a9404d0faeefdaeeb67ffc33f30389ac2dcba9 (patch)
tree9d0307b4c8e6fd55327d66cd659ca4e8b3074693 /HDF5Examples/C/H5PAR/ph5example.c
parent413d10f6e3d4db5341413ba7cd4f819eb5156a51 (diff)
downloadhdf5-b6a9404d0faeefdaeeb67ffc33f30389ac2dcba9.zip
hdf5-b6a9404d0faeefdaeeb67ffc33f30389ac2dcba9.tar.gz
hdf5-b6a9404d0faeefdaeeb67ffc33f30389ac2dcba9.tar.bz2
included best practices of using coll. metadata APIs (#4018)
Diffstat (limited to 'HDF5Examples/C/H5PAR/ph5example.c')
-rw-r--r--HDF5Examples/C/H5PAR/ph5example.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/HDF5Examples/C/H5PAR/ph5example.c b/HDF5Examples/C/H5PAR/ph5example.c
index 5ec2cdc..37d5d68 100644
--- a/HDF5Examples/C/H5PAR/ph5example.c
+++ b/HDF5Examples/C/H5PAR/ph5example.c
@@ -269,6 +269,24 @@ phdf5writeInd(char *filename)
assert(ret != FAIL);
MESG("H5Pset_fapl_mpio succeed");
+ /*
+ * OPTIONAL: It is generally recommended to set collective
+ * metadata reads on FAPL to perform metadata reads
+ * collectively, which usually allows datasets
+ * to perform better at scale, although it is not
+ * strictly necessary.
+ */
+ H5Pset_all_coll_metadata_ops(acc_tpl1, true);
+
+ /*
+ * OPTIONAL: It is generally recommended to set collective
+ * metadata writes on FAPL to perform metadata writes
+ * collectively, which usually allows datasets
+ * to perform better at scale, although it is not
+ * strictly necessary.
+ */
+ H5Pset_coll_metadata_write(acc_tpl1, true);
+
/* create the file collectively */
fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl1);
assert(fid1 != FAIL);