Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2026-03-23 The HDF5 Field Guide

Loading...
Searching...
No Matches
Group Access Properties
Property Lists (H5P) » Link Access Properties

## Detailed Description

The functions in this section can be applied to group property lists.

Group access property list functions (H5P)
Function | Purpose
--- | ---
H5Pset_all_coll_metadata_ops/H5Pget_all_coll_metadata_ops | Sets/gets metadata I/O mode for read operations

## Functions
herr_t | H5Pget_all_coll_metadata_ops (hid_t plist_id, bool *is_collective)
| Retrieves metadata read mode setting.
herr_t | H5Pset_all_coll_metadata_ops (hid_t plist_id, bool is_collective)
| Sets metadata I/O mode for read operations to be collective or independent (default).

## Function Documentation

## ◆ H5Pget_all_coll_metadata_ops()

herr_t H5Pget_all_coll_metadata_ops | ( | hid_t | plist_id,
|  | bool * | is_collective )

Retrieves metadata read mode setting.

Parameters

  [in] | plist_id | File, group, dataset, datatype, link, or attribute access property list identifier
  [out] | is_collective | Pointer to a buffer containing the Boolean value indicating whether metadata reads are collective (>0) or independent (0). Default mode: Independent (0)

Returns
  Returns a non-negative value if successful; otherwise, returns a negative value.

H5Pget_all_coll_metadata_ops() retrieves the collective metadata read setting from the access property list `plist_id` into `is_collective`.

See also
  - H5Pget_all_coll_metadata_ops()
  - H5Pget_coll_metadata_write()
  - H5Pset_all_coll_metadata_ops()
  - H5Pset_coll_metadata_write()
  - Functions with No Access Property List Parameter that May Generate Metadata Reads

Since
  1.10.0

## ◆ H5Pset_all_coll_metadata_ops()

herr_t H5Pset_all_coll_metadata_ops | ( | hid_t | plist_id,
|  | bool | is_collective )

Sets metadata I/O mode for read operations to be collective or independent (default).

Parameters

  [in] | plist_id | File, group, dataset, datatype, link, or attribute access property list identifier
  [in] | is_collective | Boolean value indicating whether metadata reads are collective (1) or independent (0). Default mode: Independent (0)

Returns
  Returns a non-negative value if successful; otherwise, returns a negative value.

H5Pset_all_coll_metadata_ops() sets the metadata I/O mode for read operations in the access property list `plist_id`.

When engaging in parallel I/O, all metadata write operations must be collective. If `is_collective` is 1, this property specifies that the HDF5 library will perform all metadata read operations collectively; if `is_collective` is 0, such operations may be performed independently.

Users must be aware that several HDF5 operations can potentially issue metadata reads. These include opening a dataset, datatype, or group; reading an attribute; or issuing a get info call such as getting information for a group with H5Fget_info(). Collective I/O requirements must be kept in mind when issuing such calls in the context of parallel I/O.

If this property is collective on a file access property list that is used in creating or opening a file, then the HDF5 library will assume that all metadata read operations issued on that file identifier will be issued collectively from all ranks irrespective of the individual setting of a particular operation. If this assumption is not adhered to, corruption will be introduced in the metadata cache and HDF5's behavior will be undefined.

Alternatively, a user may wish to avoid setting this property globally on the file access property list, and individually set it on particular object access property lists (dataset, group, link, datatype, attribute access property lists) for certain operations. This will indicate that only the operations issued with such an access property list will be called collectively and other operations may potentially be called independently. There are, however, several HDF5 operations that can issue metadata reads but have no property list in their function signatures to allow passing the collective requirement property. For those operations, the only option is to set the global collective requirement property on the file access property list; otherwise the metadata reads that can be triggered from those operations will be done independently by each process.

Functions that do not accommodate an access property list but that might issue metadata reads are listed in Functions with No Access Property List Parameter that May Generate Metadata Reads.

Attention
  As noted above, corruption will be introduced into the metadata cache and HDF5 library behavior will be undefined when both of the following conditions exist:
  - A file is created or opened with a file access property list in which the collective metadata I/O property is set to 1.
  - Any function is called that triggers an independent metadata read while the file remains open with that file access property list.
  An approach that avoids this corruption risk is described above.

See also
  - H5Pget_all_coll_metadata_ops()
  - H5Pget_coll_metadata_write()
  - H5Pset_all_coll_metadata_ops()
  - H5Pset_coll_metadata_write()
  - Functions with No Access Property List Parameter that May Generate Metadata Reads

Since
  1.10.0