Page tree









Starts logging metadata cache events if logging was previously enabled




herr_t H5Fstart_mdc_logging( hid_t file_id )

hid_t file_id   IN: Identifier of an open HDF5 file


The metadata cache is a central part of the HDF5 library through which all file metadata reads and writes take place. File metadata is normally invisible to the user and is used by the library for purposes such as locating and indexing data. File metadata should not be confused with user metadata, which consists of attributes created by users and attached to HDF5 objects such as datasets via H5A API calls.

Due to the complexity of the cache, a trace/logging feature has been created that can be used by HDF5 developers for debugging and performance analysis. The functions that control this functionality will normally be of use to a very limited number of developers outside of The HDF Group. The functions have been documented to help users create logs that can be sent with bug reports.

Control of the log functionality is straightforward. Logging is enabled via the H5P_SET_MDC_LOG_OPTIONS function, which will modify the file access property list used to open or create a file. This function has a flag that determines whether logging begins at file open or starts in a paused state. Log messages can then be controlled via the H5F_START_MDC_LOGGING and H5F_STOP_MDC_LOGGING functions. H5P_GET_MDC_LOG_OPTIONS can be used to examine a file access property list, and H5F_GET_MDC_LOGGING_STATUS will return the current state of the logging flags.

The log format is described in the Metadata Cache Logging document.


Logging can only be started or stopped if metadata cache logging was enabled via H5P_SET_MDC_LOG_OPTIONS.

When enabled and currently logging, the overhead of the logging feature will almost certainly be significant.

The log file is opened when the HDF5 file is opened or created and not when this function is called for the first time.

This function opens the log file and starts logging metadata cache operations for a particular file. Calling this function when logging has already been enabled will be considered an error.


Returns a non-negative value if successful. Otherwise returns a negative value.


Coming soon!

1.10.0C function introduced with this release.

--- Last Modified: December 20, 2018 | 01:14 PM