HDF5 1.14.6.08405a5
API Reference
|
Functions | |
herr_t | H5Fget_mdc_config (hid_t file_id, H5AC_cache_config_t *config_ptr) |
Obtains current metadata cache configuration for target file. | |
herr_t | H5Fset_mdc_config (hid_t file_id, const H5AC_cache_config_t *config_ptr) |
Attempts to configure metadata cache of target file. | |
herr_t | H5Fget_mdc_hit_rate (hid_t file_id, double *hit_rate_ptr) |
Obtains target file's metadata cache hit rate. | |
herr_t | H5Fget_mdc_size (hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr, size_t *cur_size_ptr, int *cur_num_entries_ptr) |
Obtains current metadata cache size data for specified file. | |
herr_t | H5Freset_mdc_hit_rate_stats (hid_t file_id) |
Resets hit rate statistics counters for the target file. | |
herr_t | H5Fstart_mdc_logging (hid_t file_id) |
Starts logging metadata cache events if logging was previously enabled. | |
herr_t | H5Fstop_mdc_logging (hid_t file_id) |
Stops logging metadata cache events if logging was previously enabled and is currently ongoing. | |
herr_t | H5Fget_mdc_logging_status (hid_t file_id, hbool_t *is_enabled, hbool_t *is_currently_logging) |
Gets the current metadata cache logging status. | |
herr_t | H5Fget_mdc_image_info (hid_t file_id, haddr_t *image_addr, hsize_t *image_size) |
Obtains information about a cache image if it exists. | |
herr_t H5Fget_mdc_config | ( | hid_t | file_id, |
H5AC_cache_config_t * | config_ptr | ||
) |
Obtains current metadata cache configuration for target file.
[in] | file_id | File identifier |
[in,out] | config_ptr | Pointer to the H5AC_cache_config_t instance in which the current metadata cache configuration is to be reported. The fields of this structure are discussed here. |
in
direction applies only to the H5AC_cache_config_t::version field. All other fields are out parameters.H5Fget_mdc_config() loads the current metadata cache configuration into the instance of H5AC_cache_config_t pointed to by the config_ptr
parameter.
The fields of the H5AC_cache_config_t structure are shown below:
(Click on a enumerator, field, or type for more information.)
Obtains target file's metadata cache hit rate.
[in] | file_id | File identifier |
[out] | hit_rate_ptr | Pointer to the double in which the hit rate is returned. Note that hit_rate_ptr is undefined if the API call fails |
H5Fget_mdc_hit_rate() queries the metadata cache of the target file to obtain its hit rate (cache hits / (cache hits + cache misses))
since the last time hit rate statistics were reset. If the cache has not been accessed since the last time the hit rate stats were reset, the hit rate is defined to be 0.0.
The hit rate stats can be reset either manually (via H5Freset_mdc_hit_rate_stats()), or automatically. If the cache's adaptive resize code is enabled, the hit rate stats will be reset once per epoch. If they are reset manually as well, the cache may behave oddly.
See the overview of the metadata cache in the special topics section of the user manual for details on the metadata cache and its adaptive resize algorithms.
Obtains information about a cache image if it exists.
[in] | file_id | File identifier |
[out] | image_addr | Offset of the cache image if it exists, or HADDR_UNDEF if it does not |
[out] | image_size | Length of the cache image if it exists, or 0 if it does not |
H5Fget_mdc_image_info() returns information about a cache image if it exists.
When an HDF5 file is opened in Read/Write mode, any metadata cache image will be read and deleted from the file on the first metadata cache access (or, if persistent free space managers are enabled, on the first file space allocation / deallocation, or read of free space manager status, whichever comes first).
Thus, if the file is opened Read/Write, H5Fget_mdc_image_info() should be called immediately after file open and before any other operation. If H5Fget_mdc_image_info() is called after the cache image is loaded, it will correctly report that no cache image exists, as the image will have already been read and deleted from the file. In the Read Only case, the function may be called at any time, as any cache image will not be deleted from the file.
herr_t H5Fget_mdc_logging_status | ( | hid_t | file_id, |
hbool_t * | is_enabled, | ||
hbool_t * | is_currently_logging | ||
) |
Gets the current metadata cache logging status.
[in] | file_id | File identifier |
[out] | is_enabled | Whether logging is enabled |
[out] | is_currently_logging | Whether events are currently being logged |
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 H5Pset_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 H5Fstart_mdc_logging() and H5Fstop_mdc_logging() functions. H5Pget_mdc_log_options() can be used to examine a file access property list, and H5Fget_mdc_logging_status() will return the current state of the logging flags.
The log format is described in the Metadata Cache Logging document.
herr_t H5Fget_mdc_size | ( | hid_t | file_id, |
size_t * | max_size_ptr, | ||
size_t * | min_clean_size_ptr, | ||
size_t * | cur_size_ptr, | ||
int * | cur_num_entries_ptr | ||
) |
Obtains current metadata cache size data for specified file.
[in] | file_id | File identifier |
[out] | max_size_ptr | Pointer to the location in which the current cache maximum size is to be returned, or NULL if this datum is not desired |
[out] | min_clean_size_ptr | Pointer to the location in which the current cache minimum clean size is to be returned, or NULL if that datum is not desired |
[out] | cur_size_ptr | Pointer to the location in which the current cache size is to be returned, or NULL if that datum is not desired |
[out] | cur_num_entries_ptr | Pointer to the location in which the current number of entries in the cache is to be returned, or NULL if that datum is not desired |
H5Fget_mdc_size() queries the metadata cache of the target file for the desired size information, and returns this information in the locations indicated by the pointer parameters. If any pointer parameter is NULL, the associated data is not returned.
If the API call fails, the values returned via the pointer parameters are undefined.
If adaptive cache resizing is enabled, the cache maximum size and minimum clean size may change at the end of each epoch. Current size and current number of entries can change on each cache access.
Current size can exceed maximum size under certain conditions. See the overview of the metadata cache in the special topics section of the user manual for a discussion of this.
Resets hit rate statistics counters for the target file.
[in] | file_id | File identifier |
H5Freset_mdc_hit_rate_stats() resets the hit rate statistics counters in the metadata cache associated with the specified file.
If the adaptive cache resizing code is enabled, the hit rate statistics are reset at the beginning of each epoch. This API call allows you to do the same thing from your program.
The adaptive cache resizing code may behave oddly if you use this call when adaptive cache resizing is enabled. However, the call should be useful if you choose to control metadata cache size from your program.
See Metadata Caching in HDF5 for details about the metadata cache and the adaptive cache resizing algorithms. If you have not read, understood, and thought about the material covered in that documentation, you should not be using this API call.
herr_t H5Fset_mdc_config | ( | hid_t | file_id, |
const H5AC_cache_config_t * | config_ptr | ||
) |
Attempts to configure metadata cache of target file.
[in] | file_id | File identifier |
[in,out] | config_ptr | Pointer to the H5AC_cache_config_t instance containing the desired configuration. The fields of this structure are discussed here. |
H5Fset_mdc_config() attempts to configure the file's metadata cache according configuration supplied in config_ptr
.
(Click on a enumerator, field, or type for more information.)
Starts logging metadata cache events if logging was previously enabled.
[in] | file_id | File identifier |
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 H5Pset_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 H5Fstart_mdc_logging() and H5Fstop_mdc_logging() functions. H5Pget_mdc_log_options() can be used to examine a file access property list, and H5Fget_mdc_logging_status() will return the current state of the logging flags.
The log format is described in the Metadata Cache Logging document.
Stops logging metadata cache events if logging was previously enabled and is currently ongoing.
[in] | file_id | File identifier |
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 H5Pset_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 H5Fstart_mdc_logging() and H5Fstop_mdc_logging() functions. H5Pget_mdc_log_options() can be used to examine a file access property list, and H5Fget_mdc_logging_status() will return the current state of the logging flags.
The log format is described in the Metadata Cache Logging document.