From 508695977838cff9f4f4f7ce3d5ff92d0ca765e2 Mon Sep 17 00:00:00 2001
From: Larry Knox A dataset storage layout where the dataset elements are stored in the
+ object header of the dataset. This layout is suitable for very small
+ datasets that can easily fit in the object header. Compact layout can improve storage and access performance for files
+ that have many very small datasets. Structuring the use of chunking and tuning it for performance. Describes another way that chunks can be written to datasets. Describes how to copy to another file a dataset that uses a committed datatype or an object with an attribute that uses a committed datatype so that the committed datatype in the destination file can be used by multiple objects. Managing the HDF5 metadata cache and tuning it for performance. Describes how an HDF5 application can apply a filter that is not registered with the HDF5 Library. Describes how to work with HDF5 files in memory. Disk I/O is not required when file images are opened, created, read from, or written to. Describes how to set write operations for in-memory files so that only modified regions are written to storage. Available when the Core (Memory) VFD is used. Describes how identifiers behave and how they should be treated. Describes the use of UTF-8 Unicode character encodings in HDF5 applications. Describes how inconsistent memory management can cause heap corruption or resource leaks and possible solutions. @ref GLS A glossary of terms. File image operations allow users to work with HDF5 files in memory in the same ways that users currently work with HDF5 files on disk. Disk I/O is not required when file images are opened, created, read from, or written to. An HDF5 file image is an HDF5 file that is held in a buffer in main memory. Setting up a file image in memory involves using either a buffer in the file access property list or a buffer in the Core (aka Memory) file driver. The advantage of working with a file in memory is faster access to the data. The challenge of working with files in memory buffers is maximizing performance and minimizing memory footprint while working within the constraints of the property list mechanism. This should be a non-issue for small file images, but may be a major issue for large images. If invoked with the appropriate flags, the H5LTopen_file_image() high level library call should deal with these challenges in most cases. However, some applications may require the programmer to address these issues directly. Functions used in file image operations are listed below. The following abbreviations are used in this document: Developers who use the file image operations described in this document should be proficient and experienced users of the HDF5 C Library APIs. More specifically, developers should have a working knowledge of property lists, callbacks, and virtual file drivers. See the following for more information. The “RFC: File Image Operations” is the primary source for the information in this document. The “Alternate File Storage Layouts and Low-level File Drivers” section is in “The HDF5 File” chapter of the HDF5 User’s Guide . The H5P_SET_FAPL_CORE function call can be used to modify the file access property list so that the Memory virtual file driver, H5FD_CORE, is used. The Memory file driver is also known as the Core file driver. Refer to the Virtual File Layer for more detail. A list of VFL Functions is provided below.
+
+ The C API function calls described in this chapter fall into two categories: low-level routines that are part of the main HDF5 C Library and one high-level routine that is part of the “lite” API in the high-level wrapper library. The high-level routine uses the low-level routines and presents frequently requested functionality conveniently packaged for application developers’ use. The purpose of this section is to describe the low-level C API routines that support file image operations. These routines allow an in-memory image of an HDF5 file to be opened without requiring file system I/O. The basic approach to opening an in-memory image of an HDF5 file is to pass the image to the Core file driver, and then tell the Core file driver to open the file. We do this by using the H5Pget/set_file_image calls. These calls allow the user to specify an initial file image. A potential problem with the H5Pget/set_file_image calls is the overhead of allocating and copying of large file image buffers. The callback routines enable application programs to avoid this problem. However, the use of these callbacks is complex and potentially hazardous: the particulars are discussed in the semantics and examples chapters below (see section 3.1 and section 4.1 respectively). Fortunately, use of the file image callbacks should seldom be necessary: the H5LTopen_file_image call should address most use cases. The property list facility in HDF5 is employed in file image operations. This facility was designed for passing data, not consumable resources, into API calls. The peculiar ways in which the file image allocation callbacks may be used allows us to avoid extending the property list structure to handle consumable resources cleanly and to avoid constructing a new facility for the purpose. The sub-sections below describe the low-level C APIs that are used with file image operations. The H5Pset_file_image routine allows an application to provide an image for a file driver to use as the initial contents of the file. This call was designed initially for use with the Core VFD, but it can be used with any VFD that supports using an initial file image when opening a file. See the “Virtual File Driver Feature Flags” section for more information. Calling this routine makes a copy of the provided file image buffer. See the “H5Pset_file_image_callbacks” section for more information. The signature of H5Pset_file_image is defined as follows: The parameters of H5Pset_file_image are defined as follows: fapl_id contains the ID of the target file access property list.
+buf_ptr supplies a pointer to the initial file image, or NULL if no initial file image is desired.
+buf_len contains the size of the supplied buffer, or 0 if no initial image is desired.
+If either the buf_len parameter is zero, or the buf_ptr parameter is NULL, no file image will be set in the FAPL, and any existing file image buffer in the FAPL will be released. If a buffer is released, the FAPL’s file image buf_len will be set to 0 and buf_ptr will be set to NULL. Given the tight interaction between the file image callbacks and the file image, the file image callbacks in a property list cannot be changed while a file image is defined. With properly constructed file image callbacks, it is possible to avoid actually copying the file image. The particulars of this are discussed in greater detail in the “C API Call Semantics” chapter and in the “Examples” chapter. The H5Pget_file_image routine allows an application to retrieve a copy of the file image designated for a VFD to use as the initial contents of a file. This routine uses the file image callbacks (if defined) when allocating and loading the buffer to return to the application, or it uses malloc and memcpy if the callbacks are undefined. When malloc and memcpy are used, it will be the caller’s responsibility to discard the returned buffer via a call to free. The signature of H5Pget_file_image is defined as follows: The parameters of H5Pget_file_image are defined as follows: fapl_id contains the ID of the target file access property list.
+ As with H5Pset_file_image, appropriately defined file image callbacks can allow this function to avoid buffer allocation and memory copy operations. The H5Pset_file_image_callbacks API call exists to allow an application to control the management of file image buffers through user defined callbacks. These callbacks will be used in the management of file image buffers in property lists and in select file drivers. These routines are invoked when a new file image buffer is allocated, when an existing file image buffer is copied or resized, or when a file image buffer is released from use. From the perspective of the HDF5 Library, the operations of the image_malloc, image_memcpy, image_realloc, and image_free callbacks must be identical to those of the corresponding C standard library calls (malloc, memcpy, realloc, and free). While the operations must be identical, the file image callbacks have more parameters. The callbacks and their parameters are described below. The return values of image_malloc and image_realloc are identical to the return values of malloc and realloc. However, the return values of image_memcpy and image_free are different than the return values of memcpy and free: the return values of image_memcpy and image_free can also indicate failure. See the “File Image Callback Semantics” section for more information. The signature of H5Pset_file_image_callbacks is defined as follows:H5F_examples.c. Examples are code blocks marked as Doxygen
snippets.
For example, the source code for the H5Fcreate() API sample is located between
@@ -44,7 +44,7 @@ the
//!
\endverbatim
comments in
-
+
H5F_examples.c.
Add a new API example by adding a new code block enclosed between matching
@@ -80,7 +80,7 @@ See Doxygen's Custom Comman
as a general reference.
All custom commands for this project are located in the
-aliases
+aliases
file in the doxygen
subdirectory of the main HDF5 repo.
@@ -91,7 +91,7 @@ ask for help if unsure!
For ease of reference, we define custom commands for each RFC in the RFCs section
of the
-aliases
+aliases
file. For example the custom command \Code{ref_rfc20141210} can be used to insert a
reference to "RFC: Virtual Object Layer". In other words, the markup
\verbatim
@@ -102,16 +102,16 @@ yields a clickable link:
\ref_rfc20141210
To add a new RFC, add a custom command for the RFC to the
-aliases
+aliases
file. The naming convention for the custom command is \Code{ref_rfcYYYYMMDD},
where \Code{YYYYMMDD} is the ID of the RFC. The URL is composed of the prefix
\verbatim
-https://docs.hdfgroup.org/hdf5/rfc/
+https://\RFCURL/
\endverbatim
and the name of your RFC file, typically, a PDF file, i.e., the full URL would
be
\verbatim
-https://docs.hdfgroup.org/hdf5/rfc/my_great_rfc_name.pdf
+https://\RFCURL/my_great_rfc_name.pdf
\endverbatim
\subsection hosting How Do Updates and Changes Get Published?
diff --git a/doxygen/dox/ExamplesAPI.dox b/doxygen/dox/ExamplesAPI.dox
index 12b585bdeb2..80a3dc1d66a 100644
--- a/doxygen/dox/ExamplesAPI.dox
+++ b/doxygen/dox/ExamplesAPI.dox
@@ -27,236 +27,236 @@ Languages are C, Fortran, Java (JHI5), Java Object Package, Python (High Level),
Set Space Allocation Time for Dataset
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_alloc.h5
-h5ex_d_alloc.tst
-h5ex_d_alloc.ddl
+h5ex_d_alloc.tst
+h5ex_d_alloc.ddl
Read / Write Dataset using Fletcher32 Checksum Filter
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_checksum.h5
-h5ex_d_checksum.tst
-h5ex_d_checksum.ddl
+h5ex_d_checksum.tst
+h5ex_d_checksum.ddl
Read / Write Chunked Dataset
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_chunk.h5
-h5ex_d_chunk.tst
-h5ex_d_chunk.ddl
+h5ex_d_chunk.tst
+h5ex_d_chunk.ddl
Read / Write Compact Dataset
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_compact.h5
-h5ex_d_compact.tst
-h5ex_d_compact.ddl
+h5ex_d_compact.tst
+h5ex_d_compact.ddl
Read / Write to External Dataset
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_extern.h5
-h5ex_d_extern.tst
-h5ex_d_extern.ddl
+h5ex_d_extern.tst
+h5ex_d_extern.ddl
Read / Write Dataset w/ Fill Value
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_fillval.h5
-h5ex_d_fillval.tst
-h5ex_d_fillval.ddl
+h5ex_d_fillval.tst
+h5ex_d_fillval.ddl
Read / Write GZIP Compressed Dataset
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_gzip.h5
-h5ex_d_gzip.tst
-h5ex_d_gzip.ddl
+h5ex_d_gzip.tst
+h5ex_d_gzip.ddl
Read / Write Data by Hyperslabs
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_hyper.h5
-h5ex_d_hyper.tst
-h5ex_d_hyper.ddl
+h5ex_d_hyper.tst
+h5ex_d_hyper.ddl
Read / Write Dataset with n-bit Filter
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_nbit.h5
-h5ex_d_nbit.tst
-h5ex_d_nbit.ddl
+h5ex_d_nbit.tst
+h5ex_d_nbit.ddl
Read / Write Integer Dataset
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_rdwrc.h5
-h5ex_d_rdwrc.tst
-h5ex_d_rdwr.ddl
+h5ex_d_rdwrc.tst
+h5ex_d_rdwr.ddl
Read / Write Dataset w/ Shuffle Filter and GZIP Compression
-C
+C
FORTRAN
-Java
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_shuffle.h5
-h5ex_d_shuffle.tst
-h5ex_d_shuffle.ddl
+h5ex_d_shuffle.tst
+h5ex_d_shuffle.ddl
Read / Write Dataset using Scale-Offset Filter (float)
-C
+C
FORTRAN
-Java
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_sofloat.h5
-h5ex_d_sofloat.tst
-h5ex_d_sofloat.ddl
+h5ex_d_sofloat.tst
+h5ex_d_sofloat.ddl
Read / Write Dataset using Scale-Offset Filter (integer)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_soint.h5
-h5ex_d_soint.tst
-h5ex_d_soint.ddl
+h5ex_d_soint.tst
+h5ex_d_soint.ddl
Read / Write Dataset using SZIP Compression
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_szip.h5
-h5ex_d_szip.tst
-h5ex_d_szip.ddl
+h5ex_d_szip.tst
+h5ex_d_szip.ddl
Read / Write Dataset using Data Transform Expression
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_transform.h5
-h5ex_d_transform.tst
-h5ex_d_transform.ddl
+h5ex_d_transform.tst
+h5ex_d_transform.ddl
Read / Write Unlimited Dimension Dataset
-C
+C
FORTRAN
-Java
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_unlimadd.h5
-h5ex_d_unlimadd.tst
-h5ex_d_unlimadd.ddl
+h5ex_d_unlimadd.tst
+h5ex_d_unlimadd.ddl
Read / Write GZIP Compressed Unlimited Dimension Dataset
-C
+C
FORTRAN
-Java
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_unlimgzip.h5
-h5ex_d_unlimgzip.tst
-h5ex_d_unlimgzip.ddl
+h5ex_d_unlimgzip.tst
+h5ex_d_unlimgzip.ddl
@@ -272,105 +272,105 @@ FORTRAN
Read / Write / Edit Unlimited Dimension Dataset
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_d_unlimmod.h5
-h5ex_d_unlimmod.tst
-h5ex_d_unlimmod.ddl
+h5ex_d_unlimmod.tst
+h5ex_d_unlimmod.ddl
Create "compact-or-indexed" Format Groups
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_g_compact.h5
-h5ex_g_.tst
-h5ex_g_compact1.ddl
-h5ex_g_compact2.ddl
+h5ex_g_.tst
+h5ex_g_compact1.ddl
+h5ex_g_compact2.ddl
Track links in a Group by Creation Order
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_g_corder.h5
-h5ex_g_corder.tst
+h5ex_g_corder.tst
h5ex_g_corder.ddl
Create / Open / Close a Group
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_g_create.h5
h5ex_g_create.tst
-h5ex_g_create.ddl
+h5ex_g_create.ddl
Create Intermediate Groups
-C
+C
FORTRAN
-Java
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_g_intermediate.h5
-h5ex_g_intermediate.tst
+h5ex_g_intermediate.tst
h5ex_g_intermediate.ddl
Iterate over Groups w/ H5Literate
-C
+C
FORTRAN
-Java
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_g_iterate.h5
-h5ex_g_iterate.tst
+h5ex_g_iterate.tst
h5ex_g_iterate.ddl
Set Conditions to Convert between Compact and Dense Groups
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_g_phase.h5
-h5ex_g_phase.tst
+h5ex_g_phase.tst
h5ex_g_phase.ddl
Recursively Traverse a File with H5Literate
-C
+C
FORTRAN
-Java
+Java
JavaObj MATLAB PyHigh PyLow
h5ex_g_traverse.h5
-h5ex_g_traverse.tst
+h5ex_g_traverse.tst
h5ex_g_traverse.ddl
@@ -387,347 +387,346 @@ FORTRAN
Recursively Traverse a File with H5Ovisit / H5Lvisit
-C
+C
FORTRAN
-Java
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_g_visit.h5
-h5ex_g_visit.tst
+h5ex_g_visit.tst
h5ex_g_visit.ddl
Read / Write Array (Attribute)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_arrayatt.h5
-h5ex_t_arrayatt.tst
-h5ex_t_arrayatt.ddl
+h5ex_t_arrayatt.tst
+h5ex_t_arrayatt.ddl
Read / Write Array (Dataset)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_array.h5
-h5ex_t_array.tst
-h5ex_t_array.ddl
+h5ex_t_array.ddl
Read / Write Bitfield (Attribute)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_bitatt.h5
-h5ex_t_bitatt.tst
-h5ex_t_bitatt.ddl
+h5ex_t_bitatt.tst
+h5ex_t_bitatt.ddl
Read / Write Bitfield (Dataset)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_bit.h5
-h5ex_t_bit.tst
-h5ex_t_bit.ddl
+h5ex_t_bit.tst
+h5ex_t_bit.ddl
Read / Write Compound (Attribute)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_cmpdatt.h5
-h5ex_t_cmpdatt.tst
-h5ex_t_cmpdatt.ddl
+h5ex_t_cmpdatt.tst
+h5ex_t_cmpdatt.ddl
Read / Write Compound (Dataset)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_cmpd.h5
-h5ex_t_cmpd.tst
-h5ex_t_cmpd.ddl
+h5ex_t_cmpd.tst
+h5ex_t_cmpd.ddl
Commit Named Datatype and Read Back
-C
+C
FORTRAN
-Java
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_commit.h5
-h5ex_t_commit.tst
-h5ex_t_commit.ddl
+h5ex_t_commit.tst
+h5ex_t_commit.ddl
Convert Between Datatypes in Memory
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
h5ex_t_convert.h5
-h5ex_t_convert.tst
-h5ex_t_convert.ddl
+h5ex_t_convert.tst
+h5ex_t_convert.ddl
Read / Write Complex Compound (Attribute)
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
h5ex_t_cpxcmpdatt.h5
-h5ex_t_cpxcmpdatt.tst
-h5ex_t_cpxcmpdatt.ddl
+h5ex_t_cpxcmpdatt.tst
+h5ex_t_cpxcmpdatt.ddl
Read / Write Complex Compound (Dataset)
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
h5ex_t_cpxcmpd.h5
-h5ex_t_cpxcmpd.tst
-h5ex_t_cpxcmpd.ddl
+h5ex_t_cpxcmpd.tst
+h5ex_t_cpxcmpd.ddl
Read / Write Enumerated (Attribute)
-C
-FORTRAN
+C
+FORTRAN
Java JavaObj MATLAB PyHigh PyLow
h5ex_t_enumatt.h5
-h5ex_t_enumatt.tst
-h5ex_t_enumatt.ddl
+h5ex_t_enumatt.tst
+h5ex_t_enumatt.ddl
Read / Write Enumerated (Dataset)
-C
-FORTRAN
+C
+FORTRAN
Java JavaObj MATLAB PyHigh PyLow
h5ex_t_enum.h5
-h5ex_t_enum.tst
-h5ex_t_enum.ddl
+h5ex_t_enum.tst
+h5ex_t_enum.ddl
Read / Write Floating Point (Attribute)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_floatatt.h5
-h5ex_t_floatatt.tst
-h5ex_t_floatatt.ddl
+h5ex_t_floatatt.tst
+h5ex_t_floatatt.ddl
Read / Write Floating Point (Dataset)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_float.h5
-h5ex_t_float.tst
-h5ex_t_float.ddl
+h5ex_t_float.tst
+h5ex_t_float.ddl
Read / Write Integer Datatype (Attribute)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_intatt.h5
-h5ex_t_intatt.tst
-h5ex_t_intatt.ddl
+h5ex_t_intatt.tst
+h5ex_t_intatt.ddl
Read / Write Integer Datatype (Dataset)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_int.h5
-h5ex_t_int.tst
-h5ex_t_int.ddl
+h5ex_t_int.tst
+h5ex_t_int.ddl
Read / Write Object References (Attribute)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_objrefatt.h5
-h5ex_t_objrefatt.tst
-h5ex_t_objrefatt.ddl
+h5ex_t_objrefatt.tst
+h5ex_t_objrefatt.ddl
Read / Write Object References (Dataset)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_objref.h5
-h5ex_t_objref.tst
-h5ex_t_objref.ddl
+h5ex_t_objref.tst
+h5ex_t_objref.ddl
Read / Write Opaque (Attribute)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_opaqueatt.h5
-h5ex_t_opaqueatt.tst
-h5ex_t_opaqueatt.ddl
+h5ex_t_opaqueatt.tst
+h5ex_t_opaqueatt.ddl
Read / Write Opaque (Dataset)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_opaque.h5
-h5ex_t_opaque.tst
-h5ex_t_opaque.ddl
+h5ex_t_opaque.tst
+h5ex_t_opaque.ddl
Read / Write Region References (Attribute)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_regrefatt.h5
-h5ex_t_regrefatt.tst
-h5ex_t_regrefatt.ddl
+h5ex_t_regrefatt.tst
+h5ex_t_regrefatt.ddl
Read / Write Region References (Dataset)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_regref.h5
-h5ex_t_regref.tst
-h5ex_t_regref.ddl
+h5ex_t_regref.tst
+h5ex_t_regref.ddl
Read / Write String (Attribute)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_stringatt.h5
-h5ex_t_stringatt.tst
-h5ex_t_stringatt.ddl
+h5ex_t_stringatt.tst
+h5ex_t_stringatt.ddl
Read / Write String (Dataset)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_string.h5
-h5ex_t_string.tst
-h5ex_t_string.ddl
+h5ex_t_string.tst
+h5ex_t_string.ddl
Read / Write Variable Length (Attribute)
-C
-FORTRAN
+C
+FORTRAN
Java JavaObj MATLAB PyHigh PyLow
h5ex_t_vlenatt.h5
-h5ex_t_vlenatt.tst
-h5ex_t_vlenatt.ddl
+h5ex_t_vlenatt.tst
+h5ex_t_vlenatt.ddl
Read / Write Variable Length (Dataset)
-C
-FORTRAN
+C
+FORTRAN
Java JavaObj MATLAB PyHigh PyLow
h5ex_t_vlen.h5
-h5ex_t_vlen.tst
-h5ex_t_vlen.ddl
+h5ex_t_vlen.tst
+h5ex_t_vlen.ddl
Read / Write Variable Length String (Attribute)
-C
-FORTRAN
+C
+FORTRAN
Java JavaObj MATLAB PyHigh PyLow
h5ex_t_vlstringatt.h5
-h5ex_t_vlstringatt.tst
-h5ex_t_vlstringatt.ddl
+h5ex_t_vlstringatt.tst
+h5ex_t_vlstringatt.ddl
@@ -743,92 +742,92 @@ FORTRAN
Read / Write Variable Length String (Dataset)
-C
-FORTRAN
-Java
+C
+FORTRAN
+Java
JavaObj
MATLAB PyHigh PyLow
h5ex_t_vlstring.h5
-h5ex_t_vlstring.tst
-h5ex_t_vlstring.ddl
+h5ex_t_vlstring.tst
+h5ex_t_vlstring.ddl
Read / Write Dataset using Blosc Compression
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
-h5ex_d_blosc.h5
-h5ex_d_blosc.tst
-h5ex_d_blosc.ddl
+h5ex_d_blosc.h5
+h5ex_d_blosc.tst
+h5ex_d_blosc.ddl
Read / Write Dataset using Bit Shuffle Compression
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
-h5ex_d_bshuf.h5
-h5ex_d_bshuf.tst
-h5ex_d_bshuf.ddl
+h5ex_d_bshuf.h5
+h5ex_d_bshuf.tst
+h5ex_d_bshuf.ddl
Read / Write Dataset using BZip2 Compression
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
-h5ex_d_bzip2.h5
-h5ex_d_bzip2.tst
-h5ex_d_bzip2.ddl
+h5ex_d_bzip2.h5
+h5ex_d_bzip2.tst
+h5ex_d_bzip2.ddl
Read / Write Dataset using JPEG Compression
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
-h5ex_d_jpeg.h5
-h5ex_d_jpeg.tst
-h5ex_d_jpeg.ddl
+h5ex_d_jpeg.h5
+h5ex_d_jpeg.tst
+h5ex_d_jpeg.ddl
Read / Write Dataset using LZ4 Compression
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
-h5ex_d_lz4.h5
-h5ex_d_lz4.tst
-h5ex_d_lz4.ddl
+h5ex_d_lz4.h5
+h5ex_d_lz4.tst
+h5ex_d_lz4.ddl
Read / Write Dataset using LZF Compression
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
-h5ex_d_lzf.h5
-h5ex_d_lzf.tst
-h5ex_d_lzf.ddl
+h5ex_d_lzf.h5
+h5ex_d_lzf.tst
+h5ex_d_lzf.ddl
Read / Write Dataset using MAFISC Compression
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
-h5ex_d_mafisc.h5
-h5ex_d_mafisc.tst
-h5ex_d_mafisc.ddl
+h5ex_d_mafisc.h5
+h5ex_d_mafisc.tst
+h5ex_d_mafisc.ddl
Read / Write Dataset using ZFP Compression
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
-h5ex_d_zfp.h5
-h5ex_d_zfp.tst
-h5ex_d_zfp.ddl
+h5ex_d_zfp.h5
+h5ex_d_zfp.tst
+h5ex_d_zfp.ddl
@@ -842,66 +841,66 @@ FORTRAN
Read / Write Dataset using ZStd Compression
-C
+C
FORTRAN Java JavaObj MATLAB PyHigh PyLow
-h5ex_d_zstd.h5
-h5ex_d_zstd.tst
-h5ex_d_zstd.ddl
+h5ex_d_zstd.h5
+h5ex_d_zstd.tst
+h5ex_d_zstd.ddl
Create/Read/Write an Attribute
-Java
+Java
JavaObj
-HDF5AttributeCreate.txt
+HDF5AttributeCreate.txt
Create Datasets
-Java
+Java
JavaObj
-HDF5DatasetCreate.txt
+HDF5DatasetCreate.txt
Read/Write Datasets
-Java
+Java
JavaObj
-HDF5DatasetRead.txt
+HDF5DatasetRead.txt
Create an Empty File
-Java
+Java
JavaObj
-HDF5FileCreate.txt
+HDF5FileCreate.txt
Retrieve the File Structure
-Java
+Java
JavaObj
-HDF5FileStructure.txt
+HDF5FileStructure.txt
Create Groups
-Java
+Java
JavaObj
-HDF5GroupCreate.txt
+HDF5GroupCreate.txt
Select a Subset of a Dataset
-Java
+Java
JavaObj
-HDF5SubsetSelect.txt
+HDF5SubsetSelect.txt
@@ -917,8 +916,8 @@ FORTRAN
Create Two Datasets Within Groups
-Java
+Java
JavaObj
-HDF5GroupDatasetCreate.txt
+HDF5GroupDatasetCreate.txt
Creating and Accessing a File
-C
-FORTRAN
+C
+FORTRAN
MATLAB PyHigh PyLow
ph5_.h5
@@ -927,8 +926,8 @@ FORTRAN
Creating and Accessing a Dataset
-C
-FORTRAN
+C
+FORTRAN
MATLAB PyHigh PyLow
ph5_.h5
@@ -937,8 +936,8 @@ FORTRAN
Writing and Reading Contiguous Hyperslabs
-C
-FORTRAN
+C
+FORTRAN
MATLAB PyHigh PyLow
ph5_.h5
@@ -947,8 +946,8 @@ FORTRAN
Writing and Reading Regularly Spaced Data Hyperslabs
-C
-FORTRAN
+C
+FORTRAN
MATLAB PyHigh PyLow
ph5_.h5
@@ -957,8 +956,8 @@ FORTRAN
Writing and Reading Pattern Hyperslabs
-C
-FORTRAN
+C
+FORTRAN
MATLAB PyHigh PyLow
ph5_.h5
@@ -967,8 +966,8 @@ FORTRAN
Writing and Reading Chunk Hyperslabs
-C
-FORTRAN
+C
+FORTRAN
MATLAB PyHigh PyLow
ph5_.h5
@@ -977,7 +976,7 @@ FORTRAN
Using the Subfiling VFD to Write a File Striped Across Multiple Subfiles
-C
+C
FORTRAN MATLAB PyHigh PyLow
ph5_.h5
@@ -986,7 +985,7 @@ FORTRAN
Write to Datasets with Filters Applied
-C
+C
FORTRAN MATLAB PyHigh PyLow
ph5_.h5
@@ -995,7 +994,7 @@ FORTRAN
Collectively Write Datasets with Filters and Not All Ranks have Data
-C
+C
FORTRAN MATLAB PyHigh PyLow
ph5_.h5
diff --git a/doxygen/dox/GettingStarted.dox b/doxygen/dox/GettingStarted.dox
index e48dbab543c..aa81ca28744 100644
--- a/doxygen/dox/GettingStarted.dox
+++ b/doxygen/dox/GettingStarted.dox
@@ -71,8 +71,8 @@ A brief introduction to Parallel HDF5. If you are new to HDF5 please see the @re
HDF5-1.10 New Features
-\li Introduction to the Virtual Dataset - VDS
-\li Introduction to Single-Writer/Multiple-Reader (SWMR)
+\li \ref VDS
+\li \ref SWMR
diff --git a/doxygen/dox/Glossary.dox b/doxygen/dox/Glossary.dox
index 9ccd27d2166..6822cc9bbd7 100644
--- a/doxygen/dox/Glossary.dox
+++ b/doxygen/dox/Glossary.dox
@@ -71,7 +71,13 @@
-
@@ -174,17 +180,20 @@ and an HDF5 path name in that file.
\section GLS_G G
diff --git a/doxygen/dox/IntroHDF5.dox b/doxygen/dox/IntroHDF5.dox
index 4a00b80b2f8..50253ab4573 100644
--- a/doxygen/dox/IntroHDF5.dox
+++ b/doxygen/dox/IntroHDF5.dox
@@ -608,8 +608,7 @@ on the HDF-EOS Tools and Information Center pag
\section secHDF5Examples Examples
\li \ref LBExamples
\li \ref ExAPI
-\li Examples in the Source Code
-\li Other Examples
+\li Examples in the Source Code
\section secHDF5ExamplesCompile How To Compile
For information on compiling in C, C++ and Fortran, see: \ref LBCompiling
@@ -618,10 +617,10 @@ For information on compiling in C, C++ and Fortran, see: \ref LBCompiling
IDL, MATLAB, and NCL Examples for HDF-EOS
Examples of how to access and visualize NASA HDF-EOS files using IDL, MATLAB, and NCL.
-Miscellaneous Examples
+Miscellaneous Examples
These (very old) examples resulted from working with users, and are not fully tested. Most of them are in C, with a few in Fortran and Java.
-Using Special Values
+Using Special Values
These examples show how to create special values in an HDF5 application.
*/
diff --git a/doxygen/dox/IntroParExamples.dox b/doxygen/dox/IntroParExamples.dox
index 9d148f59d64..cdab44f35a5 100644
--- a/doxygen/dox/IntroParExamples.dox
+++ b/doxygen/dox/IntroParExamples.dox
@@ -95,7 +95,7 @@ Below is the example program:
@@ -205,7 +205,7 @@ Below is the F90 example program which illustrates how to write contiguous hyper
-hyperslab_by_row.c
+hyperslab_by_row.c
@@ -275,7 +275,7 @@ Below is an example program for writing hyperslabs by column in Parallel HDF5:
-hyperslab_by_col.F90
+hyperslab_by_col.F90
@@ -346,7 +346,7 @@ Below is the example program for writing hyperslabs by column in Parallel HDF5:
-hyperslab_by_col.c
+hyperslab_by_col.c
@@ -431,12 +431,12 @@ Below are example programs for writing hyperslabs by pattern in Parallel HDF5:
-hyperslab_by_row.F90
+hyperslab_by_row.F90
@@ -530,12 +530,12 @@ Below are example programs for writing hyperslabs by pattern in Parallel HDF5:
-hyperslab_by_pattern.c
+hyperslab_by_pattern.c
-hyperslab_by_pattern.F90
+hyperslab_by_pattern.F90
diff --git a/doxygen/dox/IntroParHDF5.dox b/doxygen/dox/IntroParHDF5.dox
index 0e30249f50d..414a186af89 100644
--- a/doxygen/dox/IntroParHDF5.dox
+++ b/doxygen/dox/IntroParHDF5.dox
@@ -145,8 +145,8 @@ Following is example code for creating an access template in HDF5:
\endcode
The following example programs create an HDF5 file using Parallel HDF5:
-C: file_create.c
-F90: file_create.F90
+C: file_create.c
+F90: file_create.F90
\subsection subsec_pintro_create_dset Creating and Accessing a Dataset with PHDF5
@@ -226,8 +226,8 @@ The following code demonstrates a collective write using Parallel HDF5:
\endcode
The following example programs create an HDF5 dataset using Parallel HDF5:
-C: dataset.c
-F90: dataset.F90
+C: dataset.c
+F90: dataset.F90
\subsubsection subsec_pintro_hyperslabs Hyperslabs
@@ -264,7 +264,6 @@ HDF5 by contiguous hyperslab, by regularly spaced data in a column/row, by patte
-hyperslab_by_chunk.c
+hyperslab_by_chunk.c
-hyperslab_by_chunk.F90
+hyperslab_by_chunk.F90
Navigate back: \ref index "Main" / \ref GettingStarted
diff --git a/doxygen/dox/LearnBasics.dox b/doxygen/dox/LearnBasics.dox
index 2847be7f778..bbdf4224c09 100644
--- a/doxygen/dox/LearnBasics.dox
+++ b/doxygen/dox/LearnBasics.dox
@@ -59,7 +59,7 @@ These examples (C, C++, Fortran) are provided in the HDF5 source code and (Unix)
Create a file
-C Fortran C++ Java Python
+ C Fortran C++ Java Python
@@ -67,7 +67,7 @@ These examples (C, C++, Fortran) are provided in the HDF5 source code and (Unix)
Create a dataset
-C Fortran C++ Java Python
+ C Fortran C++ Java Python
@@ -75,7 +75,7 @@ These examples (C, C++, Fortran) are provided in the HDF5 source code and (Unix)
Read and write to a dataset
-C Fortran C++ Java Python
+ C Fortran C++ Java Python
@@ -83,7 +83,7 @@ These examples (C, C++, Fortran) are provided in the HDF5 source code and (Unix)
Create an attribute
-C Fortran C++ Java Python
+ C Fortran C++ Java Python
@@ -91,7 +91,7 @@ These examples (C, C++, Fortran) are provided in the HDF5 source code and (Unix)
Create a group
-C Fortran C++ Java Python
+ C Fortran C++ Java Python
@@ -99,7 +99,7 @@ These examples (C, C++, Fortran) are provided in the HDF5 source code and (Unix)
Create groups in a file using absolute and relative paths
-C Fortran C++ Java Python
+ C Fortran C++ Java Python
@@ -107,7 +107,7 @@ These examples (C, C++, Fortran) are provided in the HDF5 source code and (Unix)
Create datasets in a group
-C Fortran C++ Java Python
+ C Fortran C++ Java Python
@@ -115,7 +115,7 @@ These examples (C, C++, Fortran) are provided in the HDF5 source code and (Unix)
Create a file and dataset and select/read a subset from the dataset
-C Fortran C++ Java Python
+ C Fortran C++ Java Python
Also see examples to Write by row (and column) below.
@@ -123,7 +123,7 @@ These examples (C, C++, Fortran) are provided in the HDF5 source code and (Unix)
Create an extendible (unlimited dimension) dataset
-C Fortran C++ Java Python
+ C Fortran C++ Java Python
Also see examples to Extend by row (and column) below
@@ -131,7 +131,7 @@ These examples (C, C++, Fortran) are provided in the HDF5 source code and (Unix)
-Create a chunked and compressed dataset
-C Fortran C++ Java Python
+ C Fortran C++ Java Python
diff --git a/doxygen/dox/LearnBasics2.dox b/doxygen/dox/LearnBasics2.dox
index ed2810c59bf..8eda57bc0c2 100644
--- a/doxygen/dox/LearnBasics2.dox
+++ b/doxygen/dox/LearnBasics2.dox
@@ -468,7 +468,7 @@ If the offset were 1x1 (instead of 1x2), then the selection can be made:
The selections above were tested with the
-h5_subsetbk.c
+h5_subsetbk.c
example code. The memory dataspace was defined as one-dimensional.
\subsection subsecLBDsetSubRWProgRem Remarks
diff --git a/doxygen/dox/LearnBasics3.dox b/doxygen/dox/LearnBasics3.dox
index 67a4b12e106..ce907d4f6a5 100644
--- a/doxygen/dox/LearnBasics3.dox
+++ b/doxygen/dox/LearnBasics3.dox
@@ -156,9 +156,9 @@ Specifically look at the \ref ExAPI.
There are examples for different languages.
The C example to create a chunked dataset is:
-h5ex_d_chunk.c
+h5ex_d_chunk.c
The C example to create a compact dataset is:
-h5ex_d_compact.c
+h5ex_d_compact.c
\section secLBDsetLayoutChange Changing the Layout after Dataset Creation
The dataset layout is a Dataset Creation Property List. This means that once the dataset has been
@@ -166,8 +166,8 @@ created the dataset layout cannot be changed. The h5repack utility can be used t
to a new with a new layout.
\section secLBDsetLayoutSource Sources of Information
-Chunking in HDF5
-(See the documentation on Advanced Topics in HDF5)
+Chunking in HDF5
+(See the documentation on Advanced Topics in HDF5)
\see \ref sec_plist in the HDF5 \ref UG.
@@ -184,7 +184,7 @@ certain initial dimensions, then to later increase the size of any of the initia
HDF5 requires you to use chunking to define extendible datasets. This makes it possible to extend
datasets efficiently without having to excessively reorganize storage. (To use chunking efficiently,
-be sure to see the advanced topic, Chunking in HDF5.)
+be sure to see the advanced topic, Chunking in HDF5.)
The following operations are required in order to extend a dataset:
\li Declare the dataspace of the dataset to have unlimited dimensions for all dimensions that might eventually be extended.
@@ -224,7 +224,7 @@ Navigate back: \ref index "Main" / \ref GettingStarted / \ref LearnBasics
\section secLBComDsetCreate Creating a Compressed Dataset
HDF5 requires you to use chunking to create a compressed dataset. (To use chunking efficiently,
-be sure to see the advanced topic, Chunking in HDF5.)
+be sure to see the advanced topic, Chunking in HDF5.)
The following operations are required in order to create a compressed dataset:
\li Create a dataset creation property list.
@@ -294,12 +294,12 @@ Specifically look at the \ref ExAPI.
There are examples for different languages, where examples of using #H5Literate and #H5Ovisit/#H5Lvisit are included.
The h5ex_g_traverse example traverses a file using H5Literate:
-\li C: h5ex_g_traverse.c
-\li F90: h5ex_g_traverse_F03.f90
+\li C: h5ex_g_traverse.c
+\li F90: h5ex_g_traverse_F03.f90
The h5ex_g_visit example traverses a file using H5Ovisit and H5Lvisit:
-\li C: h5ex_g_visit.c
-\li F90: h5ex_g_visit_F03.f90
+\li C: h5ex_g_visit.c
+\li F90: h5ex_g_visit_F03.f90
Navigate back: \ref index "Main" / \ref GettingStarted / \ref LearnBasics
@@ -693,7 +693,7 @@ did = H5Dopen (file_id, "/foo/boo/moo"); /* absolute path */
Navigate back: \ref index "Main" / \ref GettingStarted / \ref LearnBasics
-@page LBCompiling Compiling HDF5 Applications
+/** @page LBCompiling Compiling HDF5 Applications
Navigate back: \ref index "Main" / \ref GettingStarted / \ref LearnBasics
@@ -1003,11 +1003,9 @@ There are log files for the configure, test, and build.
Navigate back: \ref index "Main" / \ref GettingStarted / \ref LearnBasics
-@page LBTraining Training Videos
-Navigate back: \ref index "Main" / \ref GettingStarted / \ref LearnBasics
-
+*/
-Training Videos
+/ref LBTraining
Navigate back: \ref index "Main" / \ref GettingStarted / \ref LearnBasics
diff --git a/doxygen/dox/LearnHDFView.dox b/doxygen/dox/LearnHDFView.dox
index 2916db841e6..2f0a0782e60 100644
--- a/doxygen/dox/LearnHDFView.dox
+++ b/doxygen/dox/LearnHDFView.dox
@@ -7,8 +7,8 @@ This tutorial enables you to get a feel for HDF5 by using the HDFView browser. I
any programming experience.
\section sec_learn_hv_install HDFView Installation
-\li Download and install HDFView. It can be downloaded from the Download HDFView page.
-\li Obtain the storm1.txt text file, used in the tutorial.
+\li Download and install HDFView. It can be downloaded from the Download HDFView page.
+\li Obtain the storm1.txt text file, used in the tutorial.
\section sec_learn_hv_begin Begin Tutorial
Once you have HDFView installed, bring it up and you are ready to begin the tutorial.
@@ -113,11 +113,11 @@ Datatype information as is):
@@ -317,8 +317,8 @@ You will see the Another Storm dataset in the Image group:
develop branch
- - HDF5 1.14.x (this site)
- - HDF5 1.12.x
- - HDF5 1.10.x
- - HDF5 1.8.x
+ - HDF5 develop branch
+ - HDF5 1.14.x (this site)
+ - HDF5 1.12.x
+ - HDF5 1.10.x
+ - HDF5 1.8.x
\par Search
If you are looking for a specific function, constant, type, etc., use the
diff --git a/doxygen/dox/TechnicalNotes.dox b/doxygen/dox/TechnicalNotes.dox
index 7edf0a0abf7..b1c809417f0 100644
--- a/doxygen/dox/TechnicalNotes.dox
+++ b/doxygen/dox/TechnicalNotes.dox
@@ -3,12 +3,14 @@
\li \ref api-compat-macros
\li \ref APPDBG
\li \ref FMTDISC
+\li \ref FILEIMGOPS
\li \ref FILTER
\li \ref IOFLOW
\li \ref TNMDC
\li \ref MT
\li \ref SWMR
\li \ref VDS
+\li \ref RELVERSION
\li \ref VFL
*/
@@ -25,6 +27,12 @@
*/
+/** \page RELVERSION HDF5 Library Release Version Numbers
+
+\htmlinclude LibraryReleaseVersionNumbers.html
+
+*/
+
/** \page VFL HDF5 Virtual File Layer
\htmlinclude VFL.html
@@ -37,6 +45,12 @@
*/
+/** \page FILEIMGOPS HDF5 File Image Operations
+
+\htmlinclude FileImageOps.html
+
+*/
+
/** \page FILTER HDF5 Filters
\htmlinclude Filters.html
@@ -60,3 +74,4 @@
\htmlinclude intro_VDS.html
*/
+
diff --git a/doxygen/dox/TrainingVideos.dox b/doxygen/dox/TrainingVideos.dox
new file mode 100644
index 00000000000..be5f557b683
--- /dev/null
+++ b/doxygen/dox/TrainingVideos.dox
@@ -0,0 +1,48 @@
+/** @page LBTraining Training Videos
+Navigate back: \ref index "Main" / \ref GettingStarted / \ref LearnBasics
+
+
+
+
+
+
+## Core Topics
+
+
+
+[**HDF5 Introduction**](https://youtu.be/S74Kc8QYDac)
+
+
+
+## Advanced Topics:
+
+
+
+[**Data Model and Basic Usage, Core Topic #1**](https://youtu.be/vKuthH200eI)
+[**Datasets, Core Topic #2**](https://youtu.be/2oDXgecMMfo)
+[**Attributes, Core Topic #3**](https://youtu.be/d_P6LhmzmWQ)
+
+
+[**Groups and Links, Core Topic #4**](https://youtu.be/29J_FxPEDxo)
+[**Discovering File Structure, Core Topic #5**](https://youtu.be/rIl1Gz8zh-8)
+[**Partial IO, Core Topic #6**](https://youtu.be/RuzwPCFGBRE)
+
+
+[**Compound Datatype, Core Topic #7**](https://youtu.be/NXWwjrPdACY)
+
+
+
+
+
+
+
+[**Dataset Storage Layouts, Advanced Topic #1**](https://youtu.be/mOTpu5KDpj8)
+[**Using Compression and Filters, Advanced Topic #2**](https://youtu.be/TvnDV-U9T4k)
+[**Using Command Line Tools, Advanced Topic #3**](https://youtu.be/CPIO1lmRkdM)
+
+Navigate back: \ref index "Main" / \ref GettingStarted / \ref LearnBasics
+
+*/
+
+
+
diff --git a/doxygen/dox/UsersGuide.dox b/doxygen/dox/UsersGuide.dox
index 3dd26f1a40a..ca478e41ec2 100644
--- a/doxygen/dox/UsersGuide.dox
+++ b/doxygen/dox/UsersGuide.dox
@@ -342,7 +342,7 @@ These documents provide additional information for the use and tuning of specifi
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
Comment
-
-n, --contents
-
-Displays a list of the objects in a file
-
-See @ref subsubsecViewToolsViewContent_h5dumpEx1
-
+-n, --contents
+Displays a list of the objects in a file
+See @ref subsubsecViewToolsViewContent_h5dumpEx1
-
-n 1, --contents=1
-
-Displays a list of the objects and attributes in a file
-
-See @ref subsubsecViewToolsViewAttr_h5dumpEx6
-
+-n 1, --contents=1
+Displays a list of the objects and attributes in a file
+See @ref subsubsecViewToolsViewAttr_h5dumpEx6
-
-H, --header
-
-Displays header information only (no data)
-
-See @ref subsubsecViewToolsViewContent_h5dumpEx2
-
+-H, --header
+Displays header information only (no data)
+See @ref subsubsecViewToolsViewContent_h5dumpEx2
-
-A 0, --onlyattr=0
-
-Suppresses the display of attributes
-
-See @ref subsubsecViewToolsViewContent_h5dumpEx2
-
+-A 0, --onlyattr=0
+Suppresses the display of attributes
+See @ref subsubsecViewToolsViewContent_h5dumpEx2
-
@@ -997,7 +982,7 @@ In other words, it is an array of four elements, in which each element is a 3 by
This dataset is much more complex. Also note that subsetting cannot be done on Array datatypes.
-See this section for more information on the Array datatype.
+See this section for more information on the Array datatype.
\subsubsection subsubsecViewToolsViewDtypes_objref Object Reference
An Object Reference is a reference to an entire object (dataset, group, or named datatype).
diff --git a/doxygen/dox/ViewToolsJPSS.dox b/doxygen/dox/ViewToolsJPSS.dox
index 9c153956797..18c8ccefa0f 100644
--- a/doxygen/dox/ViewToolsJPSS.dox
+++ b/doxygen/dox/ViewToolsJPSS.dox
@@ -11,8 +11,8 @@ Navigate back: \ref index "Main" / \ref GettingStarted / \ref ViewToolsCommand
This tutorial illustrates how to use the HDF5 tools to examine NPP files from the JPSS project. The following files are discussed:
\code
-SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5 (gzipped file)
-SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5 (gzipped file)
+SVM09_npp_d20120229_t0849107_e0854511_b01759_c20120229145452682127_noaa_ops.h5 (gzipped file)
+SVM01_npp_d20130524_t1255132_e1256374_b08146_c20130524192048864992_noaa_ops.h5 (gzipped file)
\endcode
\section secViewToolsJPSSDeter Determining File Contents
diff --git a/doxygen/dox/rm-template.dox b/doxygen/dox/rm-template.dox
index f2e48d18d1f..003d5c4b862 100644
--- a/doxygen/dox/rm-template.dox
+++ b/doxygen/dox/rm-template.dox
@@ -2,9 +2,9 @@
We treat documentation like code and use
Doxygen to
-markup
+markup
comments in the code or create
-stand-alone pages.
+stand-alone pages.
Every RM entry consists of a subset of the elements listed below. Not every RM
entry warrants the full set. More is better, and we can, perhaps, distinguish
diff --git a/doxygen/examples/FileFormat.html b/doxygen/examples/FileFormat.html
index 30428e3cad2..eff1aead0a3 100644
--- a/doxygen/examples/FileFormat.html
+++ b/doxygen/examples/FileFormat.html
@@ -36,7 +36,7 @@ TABLE CAPTION STRONG { font-size: larger }
-N P, --any_path=P
-
-Displays any object or attribute that matches path P
-
-See @ref subsubsecViewToolsViewAttr_h5dumpEx6
-
+-N P, --any_path=P
+Displays any object or attribute that matches path P
+See @ref subsubsecViewToolsViewAttr_h5dumpEx6
Background Reading:
-
diff --git a/doxygen/examples/FileImageOps.html b/doxygen/examples/FileImageOps.html
new file mode 100644
index 00000000000..2409979ff7b
--- /dev/null
+++ b/doxygen/examples/FileImageOps.html
@@ -0,0 +1,1610 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1. Introduction to HDF5 File Image Operations
+
+1.1. File Image Operations Function Summary
+
+
+
+
+
+ C Function
+ Purpose
+ Section
+
+
+
+ H5Pset_file_image
+ Specifies an initial file image
+ 2.1.1
+ H5Pget_file_image
+ Retrieves a copy of the file image designated for a VFD to use as the initial contents of a file
+ 2.1.2
+
+
+ H5Pset_file_image_callbacks
+ Manages file image buffer allocation, copying, reallocation, and release
+ 2.1.3
+
+
+ H5Pget_file_image_callbacks
+ Obtains the current file image callbacks from a file access property list
+ 2.1.4
+
+
+ H5Fget_file_image
+ Provides a simple way to retrieve a copy of the image of an existing, open file
+ 2.1.5
+
+
+ H5LTopen_file_image
+ Provides a convenient way to open an initial file image with the Core VFD
+ 2.1.6
+
+1.2. Abbreviations
+
+
+
+
+
+ Abbreviation
+ Explanation
+
+
+ FAPL or fapl
+ File Access Property List. In code samples, fapl is used.
+
+
+ VFD
+ Virtual File Driver
+
+
+VFL
+ Virtual File Layer
+ 1.3. Developer Prerequisites
+1.4. Resources
+
+
+
+
+
+ C Function
+ Purpose
+
+
+ H5Pset_driver
+ Sets a file driver
+
+
+ H5Pget_driver_info
+ Returns a pointer to file driver information
+
+
+ H5FDregister
+ Registers a new file driver as a member of the virtual file driver class
+
+
+ H5FDunregister
+ Removes a driver ID from the library
+
+
+ H5FDopen
+ Opens a file
+
+
+ H5FDclose
+ Closes the file using the driver 'close' callback
+
+
+ H5FDcmp
+ Compares the keys of two files using the file driver callback if the files belong to the same driver, otherwise sort the files by driver class pointer value
+
+
+ H5FDquery
+ Queries a VFL driver for its feature flags
+
+
+ H5FDalloc
+ Allocates memory from the file
+
+
+ H5FDfree
+ Frees format addresses in the file
+
+
+ H5FDset_eoa
+ Set the end-of-address marker for the file
+
+
+ H5FDget_eoa
+ Returns the address of the first byte after the last allocated memory in the file
+
+
+ H5FDget_eof
+ Returns the end-of-file address, which is the greater of the end-of-format address and the actual EOF marker
+
+
+ H5FDread
+ Reads bytes from the file beginning at the specified address according to the provided data transfer property list
+
+
+ H5FDwrite
+ Writes bytes to the file beginning at the specified address according to the provided data transfer property list
+
+
+H5FDflush
+ Notifies driver to flush all cached data
+ 2. C API Call Syntax
+
+2.1. Low-level C API Routines
+
+2.1.1. H5Pset_file_image
+
+herr_t H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len)
+
+2.1.2. H5Pget_file_image
+
+herr_t H5Pget_file_image(hid_t fapl_id, void **buf_ptr_ptr, size_t *buf_len_ptr)
+
+buf_ptr_ptr contains a NULL or a pointer to a void*. If buf_ptr_ptr is not NULL, on successful return, *buf_ptr_ptr will contain a pointer to a copy of the initial image provided in the last call to H5Pset_file_image for the supplied fapl_id. If no initial image has been set, *buf_ptr_ptr will be NULL.buf_len_ptr contains a NULL or a pointer to size_t. If buf_len_ptr is not NULL, on successful return, *buf_len_ptr will contain the value of the buf_len parameter for the initial image in the supplied fapl_id. If no initial image is set, the value of *buf_len_ptr will be 0.2.1.3. H5Pset_file_image_callbacks
+
+typedef enum
+{
+ H5_FILE_IMAGE_OP_PROPERTY_LIST_SET,
+ H5_FILE_IMAGE_OP_PROPERTY_LIST_COPY,
+ H5_FILE_IMAGE_OP_PROPERTY_LIST_GET,
+ H5_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE,
+ H5_FILE_IMAGE_OP_FILE_OPEN,
+ H5_FILE_IMAGE_OP_FILE_RESIZE,
+ H5_FILE_IMAGE_OP_FILE_CLOSE
+} H5_file_image_op_t;
typedef struct
+{
+ void *(*image_malloc)(size_t size, H5_file_image_op_t file_image_op,
+ void *udata);
+ void *(*image_memcpy)(void *dest, const void *src, size_t size,
+ H5_file_image_op_t file_image_op, void *udata);
+ void *(*image_realloc)(void *ptr, size_t size,
+ H5_file_image_op_t file_image_op, void *udata);
+ herr_t (*image_free)(void *ptr, H5_file_image_op_t file_image_op,
+ void *udata);
+ void *(*udata_copy)(void *udata);
+ herr_t (*udata_free)(void *udata);
+ void *udata;
+} H5_file_image_callbacks_t;
+
+herr_t H5Pset_file_image_callbacks(hid_t fapl_id,
+ H5_file_image_callbacks_t *callbacks_ptr)
fapl_id contains the ID of the target file access property list.callbacks_ptr contains a pointer to an instance of the H5_file_image_callbacks_t structure.The fields of the H5_file_image_callbacks_t structure are defined as follows: + +
image_malloc contains a pointer to a function with (from the perspective of HDF5) functionality identical to the standard C library malloc() call. The parameters of the image_malloc callback are defined as follows:size contains the size in bytes of the image buffer to allocate.file_image_op contains one of the values of H5_file_image_op_t. These values indicate the operation being performed on the file image when this callback is invoked. Possible values for file_image_op are discussed in Table 2.udata holds the value passed in for the udata parameter to H5Pset_file_image_callbacks.image_malloc to NULL indicates that the HDF5 Library should invoke the standard C library malloc() routine when allocating file image buffers.+ +
image_memcpy contains a pointer to a function with (from the perspective of HDF5) functionality identical to the standard C library memcpy() call except that it returns NULL on failure. Recall that the memcpy C Library routine is defined to return the dest parameter in all cases. The parameters of the image_memcpy callback are defined as follows:dest contains the address of the destination buffer.src contains the address of the source buffer.size contains the number of bytes to copy.file_image_op contains one of the values of H5_file_image_op_t. These values indicate the operation being performed on the file image when this callback is invoked. Possible values for file_image_op are discussed in Table 2.udata holds the value passed in for the udata parameter to H5Pset_file_image_callbacks.+ +
image_realloc contains a pointer to a function with (from the perspective of HDF5) functionality identical to the standard C library realloc() call. The parameters of the image_realloc callback are defined as follows:
ptr contains the pointer to the buffer being reallocated.size contains the desired size in bytes of the buffer after realloc.file_image_op contains one of the values of H5_file_image_op_t. These values indicate the operation being performed on the file image when this callback is invoked. Possible values for file_image_op are discussed in Table 2.udata holds the value passed in for the udata parameter to H5Pset_file_image_callbacks.+ +
image_free contains a pointer to a function with (from the perspective of HDF5) functionality identical to the standard C library free() call except that it will return 0 (SUCCEED) on success and -1 (FAIL) on failure. The parameters of the image_free callback are defined as follows:ptr contains the pointer to the buffer being released.file_image_op contains one of the values of H5_file_image_op_t. These values indicate the operation being performed on the file image when this callback is invoked. Possible values for file_image_op are discussed in Table 2 .udata holds the value passed in for the udata parameter to H5Pset_file_image_callbacks.image_free to NULL indicates that the HDF5 Library should invoke the standard C library free() routine when releasing file image buffers.+ +
udata_copy contains a pointer to a function that (from the perspective of HDF5) allocates a buffer of suitable size, copies the contents of the supplied udata into the new buffer, and returns the address of the new buffer. The function returns NULL on failure. This function is necessary if a non-NULL udata parameter is supplied, so that property lists containing the image callbacks can be copied. If the udata parameter (below) is NULL, then this parameter should be NULL as well. The parameter of the udata_copy callback is defined as follows:udata contains the pointer to the user data block being copied.+ +
udata_free contains a pointer to a function that (from the perspective of HDF5) frees a user data block. This function is necessary if a non-NULL udata parameter is supplied so that property lists containing image callbacks can be discarded without a memory leak. If the udata parameter (below) is NULL, this parameter should be NULL as well. The parameter of the udata_free callback is defined as follows:udata contains the pointer to the user data block to be freed.udata_free returns 0 (SUCCEED) on success and -1 (FAIL) on failure.
+
+ udata contains a pointer value, potentially to user-defined data, that will be passed to the image_malloc, image_memcpy, image_realloc, and image_free callbacks.+
| Value | +Comments | +
|---|---|
| H5_FILE_IMAGE_OP_PROPERTY_LIST_SET | +This value is passed to the image_malloc and image_memcpy callbacks when an image buffer is being copied while being set in a FAPL | +
| H5_FILE_IMAGE_OP_PROPERTY_LIST_COPY | +This value is passed to the image_malloc and image_memcpy callbacks when an image buffer is being copied when a FAPL is copied | +
| H5_FILE_IMAGE_OP_PROPERTY_LIST_GET | +This value is passed to the image_malloc and image_memcpy callbacks when an image buffer is being copied while being retrieved from a FAPL | +
| H5_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE | +This value is passed to the image_free callback when an image buffer is being released during a FAPL close operation. | +
| H5_FILE_IMAGE_OP_FILE_OPEN | +This value is passed to the image_malloc and image_memcpy callbacks when an image buffer is copied during a file open operation. While the image being opened will typically be copied from a FAPL, this need not always be the case. An example of an exception is when the Core file driver takes its initial image from a file. | +
| H5_FILE_IMAGE_OP_FILE_RESIZE | +This value is passed to the image_realloc callback when a file driver needs to resize an image buffer. | +
| H5_FILE_IMAGE_OP_FILE_CLOSE | +This value is passed to the image_free callback when an image buffer is being released during a file close operation. | +
In closing our discussion of H5Pset_file_image_callbacks(), we note the interaction between this call and the H5Pget/set_file_image() calls above: since the malloc, memcpy, and free callbacks defined in the instance of H5_file_image_callbacks_t are used by H5Pget/set_file_image(), H5Pset_file_image_callbacks() will fail if a file image is already set in the target property list.
+For more information on writing the file image to disk, set the backing_store parameter. See the H5Pset_fapl_core entry in the HDF5 Reference Manual.
The H5Pget_file_image_callbacks routine is designed to obtain the current file image callbacks from a file access property list.
+The signature of H5Pget_file_image_callbacks() is defined as follows:
+ +herr_t H5Pget_file_image_callbacks(hid_t fapl_id,
+ H5_file_image_callbacks_t *callbacks_ptr)
fapl_id contains the ID of the target file access property list.callbacks_ptr contains a pointer to an instance of the H5_file_image_callbacks_t structure. All fields should be initialized to NULL. See the “H5Pset_file_image_callbacks” section for more information on the H5_file_image_callbacks_t structure.H5Pget/set_file_image_callbacks() and H5Pget/set_file_image() function calls requires a pair of virtual file driver feature flags. The flags are H5FD_FEAT_ALLOW_FILE_IMAGE and H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS. Both of these are defined in H5FDpublic.h.
+
+The first flag, H5FD_FEAT_ALLOW_FILE_IMAGE, allows a file driver to indicate whether or not it supports file images. A VFD that sets this flag when its ‘query’ callback is invoked indicates that the file image set in the FAPL will be used as the initial contents of a file. Support for setting an initial file image is designed primarily for use with the Core VFD. However, any VFD can indicate support for this feature by setting the flag and copying the image in an appropriate way for the VFD (possibly by writing the image to a file and then opening the file). However, such a VFD need not employ the file image after file open time. In such cases, the VFD will not make an in-memory copy of the file image and will not employ the file image callbacks.
+ +File drivers that maintain a copy of the file in memory (only the Core file driver at present) can be constructed to use the initial image callbacks (if defined). Those that do must set the H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS flag, the second flag, when their ‘query’ callbacks are invoked.
+ +Thus file drivers that set the H5FD_FEAT_ALLOW_FILE_IMAGE flag but not the H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS flag may read the supplied image from the property list (if present) and use it to initialize the contents of the file. However, they will not discard the image when done, nor will they make any use of any file image callbacks (if defined).
+ +If an initial file image appears in a file allocation property list that is used in an H5Fopen() call, and if the underlying file driver does not set the H5FD_FEAT_ALLOW_FILE_IMAGE flag, then the open will fail.
+ +If a driver sets both the H5FD_FEAT_ALLOW_FILE_IMAGE flag and the H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS flag, then that driver will allocate a buffer of the required size, copy the contents of the initial image buffer from the file access property list, and then open the copy as if it had just loaded it from file. If the file image allocation callbacks are defined, the driver shall use them for all memory management tasks. Otherwise it will use the standard malloc, memcpy, realloc, and free C library calls for this purpose.
+ +If the VFD sets the H5FD_FEAT_ALLOW_FILE_IMAGE flag, and an initial file image is defined by an application, the VFD should ensure that file creation operations (as opposed to file open operations) bypass use of the file image, and create a new, empty file.
+ +Finally, it is logically possible that a file driver would set the H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS flag, but not the H5FD_FEAT_ALLOW_FILE_IMAGE flag. While it is hard to think of a situation in which this would be desirable, setting the flags this way will not cause any problems: the two capabilities are logically distinct.
+ +The purpose of the H5Fget_file_image routine is to provide a simple way to retrieve a copy of the image of an existing, open file. This routine can be used with files opened using the SEC2 (aka POSIX), STDIO, and Core (aka Memory) VFDs.
+ +The signature of H5Fget_file_image is defined as follows:
+ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len)
file_id contains the ID of the target file.buf_ptr contains a pointer to the buffer into which the image of the HDF5 file is to be copied. If buf_ptr is NULL, no data will be copied, but the return value will still indicate the buffer size required (or a negative value on error).buf_len contains the size of the supplied buffer.If the return value of H5Fget_file_image is a positive value, then the value will be the length of buffer required to store the file image (in other words, the length of the file). A negative value might be returned if the file is too large to store in the supplied buffer or on failure.
+ +The current file size can be obtained via a call to H5Fget_filesize(). Note that this function returns the value of the end of file (EOF) and not the end of address space (EOA). While these values are frequently the same, it is possible for the EOF to be larger than the EOA. Since H5Fget_file_image() will only obtain a copy of the file from the beginning of the superblock to the EOA, it will be best to use H5Fget_file_image() to determine the size of the buffer required to contain the image.
+ +Other Design Considerations + +Here are some other notes regarding the design and implementation of H5Fget_file_image.
+The H5Fget_file_image call should be part of the high-level library. However, a file driver agnostic implementation of the routine requires access to data structures that are hidden within the HDF5 Library. We chose to implement the call in the library proper rather than expose those data structures.
+There is no reason why the H5Fget_file_image() API call could not work on files opened with any file driver. However, the Family, Multi, and Split file drivers have issues that make the call problematic. At present, files opened with the Family file driver are marked as being created with that file driver in the superblock, and the HDF5 Library refuses to open files so marked with any other file driver. This negates the purpose of the H5Fget_file_image() call. While this mark can be removed from the image, the necessary code is not trivial.
+Thus we will not support the Family file driver in H5Fget_file_image() unless there is demand for it. Files created with the Multi and Split file drivers are also marked in the superblock. In addition, they typically use a very sparse address space. A sparse address space would require the use of an impractically large buffer for an image, and most of the buffer would be empty. So, we see no point in supporting the Multi and Split file drivers in H5Fget_file_image() under any foreseeable circumstances.
+ +The H5LTopen_file_image high-level routine encapsulates the capabilities of routines in the main HDF5 Library with conveniently accessible abstractions.
+ +The H5LTopen_file_image routine is designed to provide an easier way to open an initial file image with the Core VFD. Flags to H5LTopen_file_image allow for various file image buffer ownership policies to be requested. See the HDF5 Reference Manual for more information on high-level APIs.
+The signature of H5LTopen_file_image is defined as follows:
+ +hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_len, unsigned flags)
+
+
The parameters of H5LTopen_file_image are defined as follows:
+buf_ptr contains a pointer to the supplied initial image. A NULL value is invalid and will cause H5LTopen_file_image to fail.buf_len contains the size of the supplied buffer. A value of 0 is invalid and will cause H5LTopen_file_image to fail.flags contains a set of flags indicating whether the image is to be opened read/write, whether HDF5 is to take control of the buffer, and how long the application promises to maintain the buffer. Possible flags are described in the table below:| Value | +Comments | +
|---|---|
| H5LT_FILE_IMAGE_OPEN_RW | +Indicates that the HDF5 Library should open the image read/write instead of the default read-only. | +
| H5LT_FILE_IMAGE_DONT_COPY | +
+
|
+
| H5LT_FILE_IMAGE_DONT_RELEASE | +
+
|
+
The following table is intended to summarize the semantics of the H5LT_FILE_IMAGE_DONT_COPY and H5LT_FILE_IMAGE_DONT_RELEASE flags (shown as “Don’t Copy Flag” and “Don’t Release Flag” respectively in the table):
+ +| Don’t Copy Flag | +Don’t Release Flag | +Make Copy of User Supplied Buffer | +Pass User Supplied Buffer to File Driver | +Release User Supplied Buffer When Done | +Permit realloc of Buffer Used by File Driver | +
|---|---|---|---|---|---|
| False | +Don’t care | +True | +False | +False | +True | +
| True | +False | +False | +True | +True | +True | +
| True | +True | +False | +True | +False | +False | +
The return value of H5LTopen_file_image will be a file ID on success or a negative value on failure. The file ID returned should be closed with H5Fclose.
+Note that there is no way currently to specify a “backing store” file name in this definition of H5LTopen_image.
+ +The purpose of this chapter is to describe some issues that developers should consider when using file image buffers, property lists, and callback APIs.
+ +The H5Fget/set_file_image_callbacks() API calls allow an application to hook the memory management operations used when allocating, duplicating, and discarding file images in the property list, in the Core file driver, and potentially in any in-memory file driver developed in the future.
+From the perspective of the HDF5 Library, the supplied image_malloc(), image_memcpy(), image_realloc(), and image_free() callback routines must function identically to the C standard library malloc(), memcpy(), realloc(), and free() calls. What happens on the application side can be much more nuanced, particularly with the ability to pass user data to the callbacks. However, whatever the application does with these calls, it must maintain the illusion that the calls have had the expected effect. Maintaining this illusion requires some understanding of how the property list structure works, and what HDF5 will do with the initial images passed to it.
+At the beginning of this document, we talked about the need to work within the constraints of the property list mechanism. When we said “from the perspective of the HDF5 Library…” in the paragraph above, we are making reference to this point.
+The property list mechanism was developed as a way to add parameters to functions without changing the parameter list and breaking existing code. However, it was designed to use only “call by value” semantics, not “call by reference”. The decision to use “call by value” semantics requires that the values of supplied variables be copied into the property list. This has the advantage of simplifying the copying and deletion of property lists. However, if the value to be copied is large (say a 2 GB file image), the overhead can be unacceptable.
+The usual solution to this problem is to use “call by reference” where only a pointer to an object is placed in a parameter list rather than a copy of the object itself. However, use of “call by reference” semantics would greatly complicate the property list mechanism: at a minimum, it would be necessary to maintain reference counts to dynamically allocated objects so that the owner of the object would know when it was safe to free the object.
+After much discussion, we decided that the file image operations calls were sufficiently specialized that it made no sense to rework the property list mechanism to support “call by reference.” Instead we provided the file image callback mechanism to allow the user to implement some version of “call by reference” when needed. It should be noted that we expect this mechanism to be used rarely if at all. For small file images, the copying overhead should be negligible, and for large images, most use cases should be addressed by the H5LTopen_file_image call.
+In the (hopefully) rare event that use of the file image callbacks is necessary, the fundamental point to remember is that the callbacks must be constructed and used in such a way as to maintain the library’s illusion that it is using “call by value” semantics.
+Thus the property list mechanism must think that it is allocating a new buffer and copying the supplied buffer into it when the file image property is set. Similarly, it must think that it is allocating a new buffer and copying the contents of the existing buffer into it when it copies a property list that contains a file image. Likewise, it must think it is de-allocating a buffer when it discards a property list that contains a file image.
+Similar illusions must be maintained when a file image buffer is copied into the Core file driver (or any future driver that uses the file image callbacks) when the file driver re-sizes the buffer containing the image and finally when the driver discards the buffer.
+ +The owner of a file image in a buffer is the party that has the responsibility to discard the file image buffer when it is no longer needed. In this context, the owner is either the HDF5 Library or the application program.
+We implemented the image_* callback facility to allow efficient management of large file images. These facilities can be used to allow sharing of file image buffers between the application and the HDF5 library, and also transfer of ownership in either direction. In such operations, care must be taken to ensure that ownership is clear and that file image buffers are not discarded before all references to them are discarded by the non-owning party.
+Ownership of a file image buffer will only be passed to the application program if the file image callbacks are designed to do this. In such cases, the application program must refrain from freeing the buffer until the library has deleted all references to it. This in turn will happen after all property lists (if any) that refer to the buffer have been discarded, and the file driver (if any) that used the buffer has closed the file and thinks it has discarded the buffer.
+ +As mentioned above, the HDF5 property lists are a mechanism for passing values into HDF5 Library calls. They were created to allow calls to be extended with new parameters without changing the actual API or breaking existing code. They were designed based on the assumption that all new parameters would be “call by value” and not “call by reference.” Having “call by value” parameters means property lists can be copied, reused, and discarded with ease.
+Suppose an application wished to share a file image buffer with the HDF5 Library. This means the library would be allowed to read the file image, but not free it. The file image callbacks might be constructed as follows to share a buffer:
+ +For more information on user defined data, see the “H5Pset_file_image_callbacks” section.
+ +When a file image is opened by a driver that sets both the H5FD_FEAT_ALLOW_FILE_IMAGE and the H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS flags, the driver will allocate a buffer large enough for the initial file image and then copy the image from the property list into this buffer. As processing progresses, the driver will reallocate the image as necessary to increase its size and will eventually discard the image at file close. If defined, the driver will use the file image callbacks for these operations; otherwise, the driver will use the standard C library calls. See the "H5Pset_file_image_callbacks” section for more information.
+As described above, the file image callbacks can be constructed so as to avoid the overhead of buffer allocations and copies while allowing the HDF5 Library to maintain its illusions on the subject. There are two possible complications involving the file driver. The complications are the possibility of reallocation calls from the driver and the possibility of the continued existence of property lists containing references to the buffer.
+Suppose an application wishes to share a file image buffer with the HDF5 Library. The application allows the library to read (and possibly write) the image, but not free it. We must first decide whether the image is to be opened read-only or read/write.
+If the image will be opened read-only (or if we know that any writes will not change the size of the image), the image_realloc() call should never be invoked. Thus the image_realloc() routine can be constructed so as to always fail, and the image_malloc(), image_memcpy(), and image_free() routines can be constructed as described in the section above.
+Suppose, however, that the file image will be opened read/write and may grow during the computation. We must now allow for the base address of the buffer to change due to reallocation calls, and we must employ the user data structure to communicate any change in the buffer base address and size to the application. We pass buffer changes to the application so that the application will be able to eventually free the buffer. To this end, we might define a user data structure as shown in the example below:
+ typedef struct udata {
+ void *init_ptr;
+ size_t init_size;
+ int init_ref_count;
+ void *mod_ptr;
+ size_t mod_size;
+ int mod_ref_count;
+ }
+
+Example 1. Using a user data structure to communicate with an application
+We initialize an instance of the structure so that init_ptr points to the buffer to be shared, init_size contains the initial size of the buffer, and all other fields are initialized to either NULL or 0 as indicated by their type. We then pass a pointer to the instance of the user data structure to the HDF5 Library along with allocation callback functions constructed as follows:
+ +One can argue whether creating a file with an initial file image is closer to creating a file or opening a file. The consensus seems to be that it is closer to a file open, and thus we shall require that the initial image only be used for calls to H5Fopen().
+Whatever our convention, from an internal perspective, opening a file with an initial file image is a bit of both creating a file and opening a file. Conceptually, we will create a file on disk, write the supplied image to the file, close the file, open the file as an HDF5 file, and then proceed as usual (of course, the Core VFD will not write to the file system unless it is configured to do so). This process is similar to a file create: we are creating a file that did not exist on disk to begin with and writing data to it. Also, we must verify that no file of the supplied name is open. However, this process is also similar to a file open: we must read the superblock and handle the usual file open tasks.
+Implementing the above sequence of actions has a number of implications on the behavior of the H5Fopen() call when an initial file image is supplied:
+As we indicated earlier, if an initial file image appears in the property list of an H5Fcreate() call, it is ignored.
+While the above section on the semantics of the file image callbacks may seem rather gloomy, we get the payback here. The above says everything that needs to be said about initial file image semantics in general. The sub-section below has a few more observations on the Core file driver.
+ +At present, the Core file driver uses the open() and read() system calls to load an HDF5 file image from the file system into RAM. Further, if the backing_store flag is set in the FAPL entry specifying the use of the Core file driver, the Core file driver’s internal image will be used to overwrite the source file on either flush or close. See the H5Pset_fapl_core entry in the HDF5 Reference Manual for more information.
This results in the following observations. In all cases assume that use of the Core file driver has been specified in the FAPL.
+The purpose of this chapter is to provide examples of how to read or build an in-memory HDF5 file image.
+ +The H5Pset_file_image() function call allows the Core file driver to be initialized from an application provided buffer. The following pseudo code illustrates its use:
+ +
+<allocate and initialize buf_len and buf>
+<allocate fapl_id>
+<set fapl to use Core file driver>
+H5Pset_file_image(fapl_id, buf, buf_len);
+<discard buf any time after this point>
+<open file>
+<discard fapl any time after this point>
+<read and/or write file as desired, close>
+
+
+Example 2. Using H5Pset_file_image to initialize the Core file driver
+
+This solution is easy to code, but the supplied buffer is duplicated twice. The first time is in the call to H5Pset_file_image() when the image is duplicated and the duplicate inserted into the property list. The second time is when the file is opened: the image is copied from the property list into the initial buffer allocated by the Core file driver. This is a non-issue for small images, but this could become a significant performance hit for large images.
+If we want to avoid the extra malloc and memcpycalls, we must decide whether the application should retain ownership of the buffer or pass ownership to the HDF5 Library.
+The following pseudo code illustrates opening the image read -only using the H5LTopen_file_image() routine. In this example, the application retains ownership of the buffer and avoids extra buffer allocations and memcpy calls.
+ +
+<allocate and initialize buf_len and buf>
+hid_t file_id;
+unsigned flags = H5LT_FILE_IMAGE_DONT_COPY | H5LT_FILE_IMAGE_DONT_RELEASE;
+file_id = H5LTopen_file_image(buf, buf_len, flags);
+<read file as desired, and then close>
+<discard buf any time after this point>
+
+
+Example 3. Using H5LTopen_file_image to open a read-only file image where the application retains ownership of the buffer
+
+If the application wants to transfer ownership of the buffer to the HDF5 Library, and the standard C library routine free is an acceptable way of discarding it, the above example can be modified as follows:
+ +
+<allocate and initialize buf_len and buf>
+hid_t file_id;
+unsigned flags = H5LT_FILE_IMAGE_DONT_COPY;
+file_id = H5LTopen_file_image(buf, buf_len, flags);
+<read file as desired, and then close>
+
+
+Example 4. Using H5LTopen_file_image to open a read-only file image where the application transfers ownership of the buffer
+
+Again, file access is read-only. Read/write access can be obtained via the H5LTopen_file_image() call, but we will explore that in the section below.
+ +Before the implementation of file image operations, HDF5 supported construction of an image of an HDF5 file in memory with the Core file driver. The H5Fget_file_image() function call allows an application access to the file image without first writing it to disk. See the following code fragment:
+ +
+<Open and construct the desired file with the Core file driver>
+H5Fflush(fid);
+size = H5Fget_file_image(fid, NULL, 0);
+buffer_ptr = malloc(size);
+H5Fget_file_image(fid, buffer_ptr, size);
+
+
+Example 5. Accessing the image of a file in memory
+
+The use of H5Fget_file_image() may be acceptable for small images. For large images, the cost of the malloc() and memcpy() operations may be excessive. To address this issue, the H5Pset_file_image_callbacks() call allows an application to manage dynamic memory allocation for file images and memory-based file drivers (only the Core file driver at present). The following code fragment illustrates its use. Note that most error checking is omitted for simplicity and that H5Pset_file_image is not used to set the initial file image.
+ +
+ struct udata_t {
+ void * image_ptr;
+ size_t image_size;
+ } udata = {NULL, 0};
+
+void *image_malloc(size_t size, H5_file_image_op_t file_image_op, void *udata)
+{
+ ((struct udata_t *)udata)->image_size = size;
+ return(malloc(size));
+}
+
+void *image_memcpy)(void *dest, const void *src, size_t size,
+ H5_file_image_op_t file_image_op, void *udata)
+{
+ assert(FALSE); /* Should never be invoked in this scenario. */
+ return(NULL); /* always fails */
+}
+
+void image_realloc(void *ptr, size_t size, H5_file_image_op_t file_image_op, void *udata)
+{
+ ((struct udata_t *)udata)->image_size = size;
+ return(realloc(ptr, size));
+}
+
+herr_t image_free(void *ptr, H5_file_image_op_t file_image_op, void *udata)
+{
+ assert(file_image_op == H5_FILE_IMAGE_OP_FILE_CLOSE);
+ ((struct udata_t *)udata)->image_ptr = ptr;
+ return(0); /* if we get here, we must have been successful */
+}
+
+void *udata_copy(void *udata)
+{
+ return(udata);
+}
+
+herr_t udata_free(void *udata)
+{
+ return(0);
+}
+
+H5_file_image_callbacks_t callbacks = {image_malloc, image_memcpy,
+ image_realloc, image_free,
+ udata_copy, udata_free,
+ (void *)(&udata)};
+
+<allocate fapl_id>
+H5Pset_file_image_callbacks(fapl_id, &callbacks);
+<open core file using fapl_id, write file, close it>
+assert(udata.image_ptr!= NULL);
+/* udata now contains the base address and length of the final version of the core file */
+<use image of file, and then discard it via free()>
+
+
+Example 6. Using H5Pset_file_image_callbacks to improve memory allocation
+
+The above code fragment gives the application full ownership of the buffer used by the Core file driver after the file is closed, and it notifies the application that the HDF5 Library is done with the buffer by setting udata.image_ptr to something other than NULL. If read access to the buffer is sufficient, the H5Fget_vfd_handle() call can be used as an alternate solution to get access to the base address of the Core file driver’s buffer.
+The above solution avoids some unnecessary mallocand memcpycalls and should be quite adequate if an image of an HDF5 file is constructed only occasionally. However, if an HDF5 file image must be constructed regularly, and if we can put a strong and tight upper bound on the size of the necessary buffer, then the following pseudo code demonstrates a method of avoiding memory allocation completely. The downside, however, is that buffer is allocated statically. Again, much error checking is omitted for clarity.
+ +
+char buf[BIG_ENOUGH];
+struct udata_t {
+void * image_ptr;
+size_t image_size;
+size_t max_image_size;
+int ref_count;
+} udata = {(void *)(&(buf[0]), 0, BIG_ENOUGH, 0};
+
+void *image_malloc(size_t size, H5_file_image_op_t file_image_op, void *udata)
+{
+ assert(size <= ((struct udata_t *)udata)->max_image_size);
+ assert(((struct udata_t *)udata)->ref_count == 0);
+ ((struct udata_t *)udata)->image_size = size;
+ (((struct udata_t *)udata)->ref_count)++;
+ return((((struct udata_t *)udata)->image_ptr);
+}
+void *image_memcpy)(void *dest, const void *src, size_t size, H5_file_image_op_t file_image_op, void *udata)
+{
+ assert(FALSE); /* Should never be invoked in this scenario. */
+ return(NULL); /* always fails */
+}
+void *image_realloc(void *ptr, size_t size, H5_file_image_op_t file_image_op, void *udata)
+{
+ assert(ptr == ((struct udata_t *)udata)->image_ptr);
+ assert(size <= ((struct udata_t *)udata)->max_image_size);
+ assert(((struct udata_t *)udata)->ref_count == 1);
+ ((struct udata_t *)udata)->image_size = size;
+ return((((struct udata_t *)udata)->image_ptr);
+}
+herr_t image_free(void *ptr, H5_file_image_op_t file_image_op, void *udata)
+{
+ assert(file_image_op == H5_FILE_IMAGE_OP_FILE_CLOSE);
+ assert(ptr == ((struct udata_t *)udata)->image_ptr);
+ assert(((struct udata_t *)udata)->ref_count == 1);
+ (((struct udata_t *)udata)->ref_count)--;
+ return(0); /* if we get here, we must have been successful */
+}
+void *udata_copy(void *udata)
+{
+ return(udata);
+}
+herr_t udata_free(void *udata)
+{
+ return(0);
+}
+H5_file_image_callbacks_t callbacks = {image_malloc, image_memcpy,
+ image_realloc, image_free,
+ udata_copy, udata_free,
+ (void *)(&udata)};
+/* end of initialization */
+<allocate fapl_id>
+H5Pset_file_image_callbacks(fapl_id, &callbacks);
+<open core file using fapl_id>
+<discard fapl any time after the open>
+<write the file, flush it, and then close it>
+assert(udata.ref_count == 0);
+/* udata now contains the base address and length of the final version of the core file */
+<use the image of the file>
+<reinitialize udata, and repeat the above from the end of initialization onwards to write a new file image>
+
+
+Example 7. Using H5Pset_file_image_callbacks with a static buffer
+
+If we can further arrange matters so that only the contents of the datasets in the HDF5 file image change, but not the structure of the file itself, we can optimize still further by re-using the image and changing only the contents of the datasets after the initial write to the buffer. The following pseudo code shows how this might be done. Note that the code assumes that buf already contains the image of the HDF5 file whose dataset contents are to be overwritten. Again, much error checking is omitted for clarity. Also, observe that the file image callbacks do not support the H5Pget_file_image() call.
+ +
+<buf already defined and loaded with file image>
+<udata already defined and initialized>
+void *image_malloc(size_t size, H5_file_image_op_t file_image_op, void *udata)
+{
+ assert(size <= ((struct udata_t *)udata)->max_image_size);
+ assert(size == ((struct udata_t *)udata)->image_size);
+ assert(((struct udata_t *)udata)->ref_count >= 0);
+ ((struct udata_t *)udata)->image_size = size;
+ (((struct udata_t *)udata)->ref_count)++;
+ return((((struct udata_t *)udata)->image_ptr);
+}
+void *image_memcpy)(void *dest, const void *src, size_t size, H5_file_image_op_t file_image_op, void *udata)
+{
+ assert(dest == ((struct udata_t *)udata)->image_ptr);
+ assert(src == ((struct udata_t *)udata)->image_ptr);
+ assert(size <= ((struct udata_t *)udata)->max_image_size);
+ assert(size == ((struct udata_t *)udata)->image_size);
+ assert(((struct udata_t *)udata)->ref_count >= 1);
+ return(dest); /* if we get here, we must have been successful */
+}
+void *image_realloc(void *ptr, size_t size, H5_file_image_op_t file_image_op, void *udata)
+{
+ /* One would think that this function is not needed in this scenario, as
+ * only the contents of the HDF5 file is being changed, not its size or
+ * structure. However, the Core file driver calls realloc() just before
+ * close to clip the buffer to the size indicated by the end of the
+ * address space.
+ *
+ * While this call must be supported in this case, the size of
+ * the image should never change. Hence the function can limit itself
+ * to performing sanity checks, and returning the base address of the
+ * statically allocated buffer.
+ */
+ assert(ptr == ((struct udata_t *)udata)->image_ptr);
+ assert(size <= ((struct udata_t *)udata)->max_image_size);
+ assert(((struct udata_t *)udata)->ref_count >= 1);
+ assert(((struct udata_t *)udata)->image_size == size);
+ return((((struct udata_t *)udata)->image_ptr);
+}
+herr_t image_free(void *ptr, H5_file_image_op_t file_image_op, void *udata)
+{
+ assert((file_image_op == H5_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE) ||
+ (file_image_op == H5_FILE_IMAGE_OP_FILE_CLOSE));
+ assert(((struct udata_t *)udata)->ref_count >= 1);
+ (((struct udata_t *)udata)->ref_count)--;
+ return(0); /* if we get here, we must have been successful */
+}
+void *udata_copy(void *udata)
+{
+ return(udata);
+}
+herr_t udata_free(void *udata)
+{
+ return(0);
+}
+H5_file_image_callbacks_t callbacks = {image_malloc, image_memcpy,
+ image_realloc, image_free,
+ udata_copy, udata_free,
+ (void *)(&udata)};
+/* end of initialization */
+<allocate fapl_id>
+H5Pset_file_image_callbacks(fapl_id, &callbacks);
+H5Pset_file_image(fapl_id, udata.image_ptr, udata.image_len);
+<open core file using fapl_id>
+<discard fapl any time after the open>
+<overwrite data in datasets in the file, and then close it>
+assert(udata.ref_count == 0);
+/* udata now contains the base address and length of the final version of the core file */
+<use the image of the file>
+<repeat the above from the end of initialization onwards to write new data to datasets in file image>
+
+
+Example 8. Using H5Pset_file_image_callbacks where only the datasets change
+
+Before we go on, we should note that the above pseudo code can be written more compactly, albeit with fewer sanity checks, using the H5LTopen_file_image() call. See the example below:
+ +
+<buf already defined and loaded with file image>
+<udata already defined and initialized>
+hid_t file_id;
+unsigned flags = H5LT_FILE_IMAGE_OPEN_RW | H5LT_FILE_IMAGE_DONT_COPY | H5LT_FILE_IMAGE_DONT_RELEASE;
+/* end initialization */
+file_id = H5LTopen_file_image(udata.image_ptr, udata.image_len, flags);
+<overwrite data in datasets in the file, and then close it>
+/* udata now contains the base address and length of the final version of the core file */
+<use the image of the file>
+<repeat the above from the end of initialization onwards to write new data to datasets in file image>
+
+
+Example 9. Using H5LTopen_file_image where only the datasets change +
The above pseudo code allows updates of a file image about as cheaply as possible. We assume the application has enough RAM for the image and that the HDF5 file structure is constant after the first write.
+While the scenario above is plausible, we will finish this section with a more general scenario. In the pseudo code below, we assume sufficient RAM to retain the HDF5 file image between uses, but we do not assume that the HDF5 file structure remains constant or that we can place a hard pper bound on the image size.
+Since we must use malloc, realloc, and free in this example, and since realloc can change the base address of a buffer, we must maintain two of ptr, size, and ref_count triples in the udata structure. The first triple is for the property list (which will never change the buffer), and the second triple is for the file driver. As shall be seen, this complicates the file image callbacks considerably. Note also that while we do not use H5Pget_file_image() in this example, we do include support for it in the file image callbacks. As usual, much error checking is omitted in favor of clarity.
+ +
+struct udata_t {
+ void * fapl_image_ptr;
+ size_t fapl_image_size;
+ int fapl_ref_count;
+ void * vfd_image_ptr;
+ size_t vfd_image_size;
+ nt vfd_ref_count;
+ } udata = {NULL, 0, 0, NULL, 0, 0};
+boolean initial_file_open = TRUE;
+
+void *image_malloc(size_t size, H5_file_image_op_t file_image_op, void *udata)
+{
+ void * return_value = NULL;
+ switch ( file_image_op ) {
+ case H5_FILE_IMAGE_OP_PROPERTY_LIST_SET:
+ case H5_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
+ assert(((struct udata_t *)udata)->fapl_image_ptr != NULL);
+ assert(((struct udata_t *)udata)->fapl_image_size == size);
+ assert(((struct udata_t *)udata)->fapl_ref_count >= 0);
+ return_value = ((struct udata_t *)udata)->fapl_image_ptr;
+ (((struct udata_t *)udata)->fapl_ref_count)++;
+ break;
+ case H5_FILE_IMAGE_OP_PROPERTY_LIST_GET:
+ assert(((struct udata_t *)udata)->fapl_image_ptr != NULL);
+ assert(((struct udata_t *)udata)->vfd_image_size == size);
+ assert(((struct udata_t *)udata)->fapl_ref_count >= 1);
+ return_value = ((struct udata_t *)udata)->fapl_image_ptr;
+ /* don’t increment ref count */
+ break;
+ case H5_FILE_IMAGE_OP_FILE_OPEN:
+ assert(((struct udata_t *)udata)->vfd_image_ptr == NULL);
+ assert(((struct udata_t *)udata)->vfd_image_size == 0);
+ assert(((struct udata_t *)udata)->vfd_ref_count == 0);
+ if (((struct udata_t *)udata)->fapl_image_ptr == NULL ) {
+ ((struct udata_t *)udata)->vfd_image_ptr = malloc(size);
+ ((struct udata_t *)udata)->vfd_image_size = size;
+ } else {
+ assert(((struct udata_t *)udata)->fapl_image_size == size);
+ assert(((struct udata_t *)udata)->fapl_ref_count >= 1);
+ ((struct udata_t *)udata)->vfd_image_ptr = ((struct udata_t *)udata)->fapl_image_ptr;
+ ((struct udata_t *)udata)->vfd_image_size = size;
+ }
+ return_value = ((struct udata_t *)udata)->vfd_image_ptr;
+ (((struct udata_t *)udata)->vfd_ref_count)++;
+ break;
+ default:
+ assert(FALSE);
+ }
+ return(return_value);
+}
+
+void *image_memcpy)(void *dest, const void *src, size_t size,
+ H5_file_image_op_t file_image_op, void *udata)
+{
+ switch(file_image_op) {
+ case H5_FILE_IMAGE_OP_PROPERTY_LIST_SET:
+ case H5_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
+ case H5_FILE_IMAGE_OP_PROPERTY_LIST_GET:
+ assert(dest == ((struct udata_t *)udata)->fapl_image_ptr);
+ assert(src == ((struct udata_t *)udata)->fapl_image_ptr);
+ assert(size == ((struct udata_t *)udata)->fapl_image_size);
+ assert(((struct udata_t *)udata)->fapl_ref_count >= 1);
+ break;
+ case H5_FILE_IMAGE_OP_FILE_OPEN:
+ assert(dest == ((struct udata_t *)udata)->vfd_image_ptr);
+ assert(src == ((struct udata_t *)udata)->fapl_image_ptr);
+ assert(size == ((struct udata_t *)udata)->fapl_image_size);
+ assert(size == ((struct udata_t *)udata)->vfd_image_size);
+ assert(((struct udata_t *)udata)->fapl_ref_count >= 1);
+ assert(((struct udata_t *)udata)->vfd_ref_count == 1);
+ break;
+ default:
+ assert(FALSE);
+ break;
+ }
+ return(dest); /* if we get here, we must have been successful */
+}
+
+void *image_realloc(void *ptr, size_t size, H5_file_image_op_t file_image_op, void *udata)
+{
+ assert(ptr == ((struct udata_t *)udata)->vfd_image_ptr); |
+ assert(((struct udata_t *)udata)->vfd_ref_count == 1);
+ ((struct udata_t *)udata)->vfd_image_ptr = realloc(ptr, size);
+ ((struct udata_t *)udata)->vfd_image_size = size;
+ return((((struct udata_t *)udata)->vfd_image_ptr);
+}
+
+herr_t image_free(void *ptr, H5_file_image_op_t file_image_op, void *udata)
+{
+ switch(file_image_op) {
+ case H5_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
+ assert(ptr == ((struct udata_t *)udata)->fapl_image_ptr);
+ assert(((struct udata_t *)udata)->fapl_ref_count >= 1);
+ (((struct udata_t *)udata)->fapl_ref_count)--;
+ break;
+ case H5_FILE_IMAGE_OP_FILE_CLOSE:
+ assert(ptr == ((struct udata_t *)udata)->vfd_image_ptr);
+ assert(((struct udata_t *)udata)->vfd_ref_count == 1);
+ (((struct udata_t *)udata)->vfd_ref_count)--;
+ break;
+ default:
+ assert(FALSE);
+ break;
+ }
+ return(0); /* if we get here, we must have been successful */
+}
+
+void *udata_copy(void *udata)
+{
+ return(udata);
+}
+
+herr_t udata_free(void *udata)
+{
+ return(0);
+}
+H5_file_image_callbacks_t callbacks = {image_malloc, image_memcpy,
+ image_realloc, image_free,
+ udata_copy, udata_free,
+ (void *)(&udata)};
+/* end of initialization */
+<allocate fapl_id>
+H5Pset_file_image_callbacks(fapl_id, &callbacks);
+if ( initial_file_open ) {
+ initial_file_open = FALSE;
+} else {
+ assert(udata.vfd_image_ptr != NULL);
+ assert(udata.vfd_image_size > 0);
+ assert(udata.vfd_ref_count == 0);
+ assert(udata.fapl_ref_count == 0);
+ udata.fapl_image_ptr = udata.vfd_image_ptr;
+ udata.fapl_image_size = udata.vfd_image_size;
+ udata.vfd_image_ptr = NULL;
+ udata.vfd_image_size = 0;
+ H5Pset_file_image(fapl_id, udata.fapl_image_ptr, udata.fapl_image_size);
+}
+
+<open core file using fapl_id>
+<discard fapl any time after the open>
+<write/update the file, and then close it>
+assert(udata.fapl_ref_count == 0);
+assert(udata.vfd_ref_count == 0);
+/* udata.vfd_image_ptr and udata.vfd_image_size now contain the base address and length of the final version of the core file */
+<use the image of the file>
+<repeat the above from the end of initialization to modify the file image as needed>
+<free the image when done>
+
+
+Example 10. Using H5LTopen_file_image where only the datasets change and where the file structure and image size might not be constant
+
+The above pseudo code shows how a buffer can be passed back and forth between the application and the HDF5 Library. The code also shows the application having control of the actual allocation, reallocation, and freeing of the buffer.
+ +Using the file image operations described in this document, we can bundle up data in an image of an HDF5 file on one process, transmit the image to a second process, and then open and read the image on the second process without any mandatory file system I/O.
+We have already demonstrated the construction and reading of such buffers above, but it may be useful to offer an example of the full operation. We do so in the example below using as simple a set of calls as possible. The set of calls in the example has extra buffer allocations. To reduce extra buffer allocations, see the sections above.
+In the following example, we construct an HDF5 file image on process A and then transmit the image to process B where we then open the image and extract the desired data. Note that no file system I/O is performed: all the processing is done in memory with the Core file driver.
+ +| *** Process A *** | +*** Process B *** | +
|---|---|
| <Open and construct the desired file with the Core file driver> | +hid_t file_id; | +
| H5Fflush(fid); | ++ |
| size = H5Fget_file_image(fid, NULL, 0); | ++ |
| buffer_ptr = malloc(size); | ++ |
| H5Fget_file_image(fid, buffer_ptr, size); | ++ |
| <transmit size> | +<receive size> |
+
| <transmit *buffer_ptr> | +buffer_ptr = malloc(size) | +
| free(buffer_ptr); | +<receive image in *buffer_ptr> | +
| <close core file> | +file_id = H5LTopen_file_image(buf, + buf_len, + H5LT_FILE_IMAGE_DONT_COPY); | +
| + | <read data from file, then close. note that the Core file driver will discard the buffer on close> | +
After the above examples, an example of the use of a template file might seem anti-climactic. A template file might be used to enforce consistency on file structure between files or in parallel HDF5 to avoid long sequences of collective operations to create the desired groups, datatypes, and possibly datasets. The following pseudo code outlines a potential use:
+ +
+<allocate and initialize buf and buflen, with buf containing the desired initial image (which in turn contains the desired group, datatype, and dataset definitions), and buf_len containing the size of buf>
+<allocate fapl_id>
+<set fapl to use desired file driver that supports initial images>
+H5Pset_file_image(fapl_id, buf, buf_len);
+<discard buf any time after this point>
+<open file>
+<discard fapl any time after this point>
+<read and/or write file as desired, close>
+
+
+Example 12. Using a template file
+
+Observe that the above pseudo code includes an unnecessary buffer allocation and copy in the call to H5Pset_file_image(). As we have already discussed ways of avoiding this, we will not address that issue here.
+What is interesting in this case is to consider why the application would find this use case attractive.
+In the serial case, at first glance there seems little reason to use the initial image facility at all. It is easy enough to use standard C calls to duplicate a template file, rename it as desired, and then open it as an HDF5 file.
+However, this assumes that the template file will always be available and in the expected place. This is a questionable assumption for an application that will be widely distributed. Thus, we can at least make an argument for either keeping an image of the template file in the executable or for including code for writing the desired standard definitions to new HDF5 files.
+Assuming the image is relatively small, we can further make an argument for the image in place of the code, as, quite simply, the image should be easier to maintain and modify with an HDF5 file editor.
+However, there remains the question of why one should pass the image to the HDF5 Library instead of writing it directly with standard C calls and then using HDF5 to open it. Other than convenience and a slight reduction in code size, we are hard pressed to offer a reason.
+In contrast, the argument is stronger in the parallel case since group, datatype, and dataset creations are all expensive collective operations. The argument is also weaker: simply copying an existing template file and opening it should lose many of its disadvantages in the HPC context although we would imagine that it is always useful to reduce the number of files in a deployment.
+In closing, we would like to consider one last point. In the parallel case, we would expect template files to be quite large. Parallel HDF5 requires eager space allocation for chunked datasets. For similar reasons, we would expect template files in this context to contain long sequences of zeros with a scattering of metadata here and there. Such files would compress well, and the compressed images would be cheap to distribute across the available processes if necessary. Once distributed, each process could uncompress the image and write to file those sections containing actual data that lay within the section of the file assigned to the process. This approach might be significantly faster than a simple copy as it would allow sparse writes, and thus it might provide a compelling use case for template files. However, this approach would require extending our current API to allow compressed images. We would also have to add the H5Pget/set_image_decompression_callback() API calls. We see no problem in doing this. However, it is beyond the scope of the current effort, and thus we will not pursue the matter further unless there is interest in our doing so.
+ +Potential Java function call signatures for the file image operation APIs are described in this section. These have not yet been implemented, and there are no immediate plans for implementation.
+Note that the H5LTopen_file_image() call is omitted. We have not supported high-level library calls in Java.
+ +H5Pset_file_image
+int H5Pset_file_image(int fapl_id, const byte[] buf_ptr);
herr_t H5Pget_file_image(hid_t fapl_id, byte[] buf_ptr_ptr);
public static H5_file_image_op_t
+{
+ H5_FILE_IMAGE_OP_PROPERTY_LIST_SET,
+ H5_FILE_IMAGE_OP_PROPERTY_LIST_COPY,
+ H5_FILE_IMAGE_OP_PROPERTY_LIST_GET,
+ H5_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE,
+ H5_FILE_IMAGE_OP_FILE_OPEN,
+ H5_FILE_IMAGE_OP_FILE_RESIZE,
+ H5_FILE_IMAGE_OP_FILE_CLOSE
+}
+
+H5_file_image_malloc_cb
+public interface H5_file_image_malloc_cb extends Callbacks {
+ buf[] callback(H5_file_image_op_t file_image_op, CBuserdata udata);
+}
+
+H5_file_image_memcpy_cb
+public interface H5_file_image_memcpy_cb extends Callbacks {
+buf[] callback(buf[] dest, const buf[] src, H5_file_image_op_t file_image_op, CBuserdata
+udata);
+}
+
+H5_file_image_realloc_cb
+public interface H5_file_image_realloc_cb extends Callbacks {
+ buf[] callback(buf[] ptr, H5_file_image_op_t file_image_op, CBuserdata udata);
+}
+
+H5_file_image_free_cb
+public interface H5_file_image_free_cb extends Callbacks {
+ void callback(buf[] ptr, H5_file_image_op_t file_image_op, CBuserdata udata);
+}
+
+H5_file_udata_copy_cb
+public interface H5_file_udata_copy_cb extends Callbacks {
+ buf[] callback(CBuserdata udata);
+}
+
+H5_file_udata_free_cb
+public interface H5_file_udata_free_cb extends Callbacks {
+ void callback(CBuserdata udata);
+}
+
+H5_file_image_callbacks_t
+public abstract class H5_file_image_callbacks_t
+{
+ H5_file_image_malloc_cb image_malloc;
+ H5_file_image_memcpy_cb image_memcpy;
+ H5_file_image_realloc_cb image_realloc;
+ H5_file_image_free_cb image_free;
+ H5_file_udata_copy_cb udata_copy;
+ H5_file_udata_free_cb udata_free;
+ CBuserdata udata;
+ public H5_file_image_callbacks_t(
+ H5_file_image_malloc_cb image_malloc,
+ H5_file_image_memcpy_cb image_memcpy,
+ H5_file_image_realloc_cb image_realloc,
+ H5_file_image_free_cb image_free,
+ H5_file_udata_copy_cb udata_copy,
+ H5_file_udata_free_cb udata_free,
+ CBuserdata udata) {
+ this.image_malloc = image_malloc;
+ this.image_memcpy = image_memcpy;
+ this.image_realloc = image_realloc;
+ this.image_free = image_free;
+ this.udata_copy = udata_copy;
+ this.udata_free = udata_free;
+ this.udata = udata;
+ }
+}
+
+H5Pset_file_image_callbacks
+int H5Pset_file_image_callbacks(int fapl_id, H5_file_image_callbacks_t callbacks_ptr);
+
+H5Pget_file_image_callbacks
+int H5Pget_file_image_callbacks(int fapl_id, H5_file_image_callbacks_t[] callbacks_ptr);
+
+H5Fget_file_image
+long H5Fget_file_image(int file_id, byte[] buf_ptr);
+
+Potential Fortran function call signatures for the file image operation APIs are described in this section. These have not yet been implemented, and there are no immediate plans for implementation.
+ +The Fortran low-level APIs make use of Fortran 2003’s ISO_C_BINDING module in order to achieve portable and standard conforming interoperability with the C APIs. The C pointer (C_PTR) and function pointer (C_FUN_PTR) types are returned from the intrinsic procedures C_LOC(X) and C_FUNLOC(X), respectively, defined in the ISO_C_BINDING module. The argument X is the data or function to which the C pointers point to and must have the TARGET attribute in the calling program. Note that the variable name lengths of the Fortran equivalent of the predefined C constants were shortened to less than 31 characters in order to be Fortran standard compliant.
+ +The signature of H5Pset_file_image_f is defined as follows:
+SUBROUTINE H5Pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr)
+
+
The parameters of H5Pset_file_image are defined as follows:
+ +INTEGER(hid_t), INTENT(IN):: fapl_id |
+Will contain the ID of the target file access property list. | +
TYPE(C_PTR), INTENT(IN):: buf_ptr |
+Will supply the C pointer to the initial file image or C_NULL_PTR if no initial file image is desired. | +
INTEGER(size_t), INTENT(IN):: buf_len |
+Will contain the size of the supplied buffer or 0 if no initial image is desired. | +
INTEGER, INTENT(OUT) :: hdferr |
+Will return the error status: 0 for success and -1 for failure. | +
The signature of H5Pget_file_image_f is defined as follows:
+SUBROUTINE H5Pget_file_image_f(fapl_id, buf_ptr, buf_len, hdferr)
+
+
The parameters of H5Pget_file_image_f are defined as follows:
+INTEGER(hid_t), INTENT(IN) :: fapl_id |
+Will contain the ID of the target file access property list | +
TYPE(C_PTR), INTENT(INOUT), VALUE :: buf_ptr |
+Will hold either a C_NULL_PTR or a scalar of type c_ptr. If buf_ptr is not C_NULL_PTR, on successful return, buf_ptr shall contain a C pointer to a copy of the initial image provided in the last call to H5Pset_file_image_f for the supplied fapl_id, or buf_ptr shall contain a C_NULL_PTR if there is no initial image set. The Fortran pointer can be obtained using the intrinsic C_F_POINTER. | +
INTEGER(size_t), INTENT(OUT) :: buf_len |
+Will contain the value of the buffer parameter for the initial image in the supplied fapl_id. The value will be 0 if no initial image is set. | +
INTEGER, INTENT(OUT) :: hdferr |
+Will return the error status: 0 for success and -1 for failure. | +
The signature of H5Pset_file_image_callbacks_f is defined as follows: + +
+INTEGER :: H5_IMAGE_OP_PROPERTY_LIST_SET_F=0,
+ H5_IMAGE_OP_PROPERTY_LIST_COPY_F=1,
+ H5_IMAGE_OP_PROPERTY_LIST_GET_F=2,
+ H5_IMAGE_OP_PROPERTY_LIST_CLOSE_F=3,
+ H5_IMAGE_OP_FILE_OPEN_F=4,
+ H5_IMAGE_OP_FILE_RESIZE_F=5,
+ H5_IMAGE_OP_FILE_CLOSE_F=6
+TYPE, BIND(C) :: H5_file_image_callbacks_t
+ TYPE(C_FUN_PTR), VALUE :: image_malloc
+ TYPE(C_FUN_PTR), VALUE :: image_memcpy
+ TYPE(C_FUN_PTR), VALUE :: image_realloc
+ TYPE(C_FUN_PTR), VALUE :: image_free
+ TYPE(C_FUN_PTR), VALUE :: udata
+ TYPE(C_FUN_PTR), VALUE :: udata_copy
+ TYPE(C_FUN_PTR), VALUE :: udata_free
+ TYPE(C_PTR), VALUE :: udata
+END TYPE H5_file_image_callbacks_t
+
+
+The semantics of the above values will be the same as those defined in the C enum. See Section 2.1.3 for more information.
+Fortran Callback APIs
+The Fortran callback APIs are shown below.
+FUNCTION op_func(size, file_image_op, udata,) RESULT(image_malloc) + +
| INTEGER(size_t) :: size | +Will contain the size of the image buffer to allocate in bytes. | +
| INTEGER :: file_image_op | +Will be set to one of the values of H5_IMAGE_OP_* indicating the operation being performed on the file image when this callback is invoked. | +
| TYPE(C_PTR), VALUE :: udata | +Will be set to the value passed in for the udata parameter to H5Pset_file_image_callbacks_f. | +
| TYPE(C_FUN_PTR), VALUE :: image_malloc | +Shall contain a pointer to a function with functionality identical to the standard C library memcpy() call. | +
FUNCTION op_func(dest, src, size, & file_image_op, udata) RESULT(image_memcpy) + +
| TYPE(C_PTR), VALUE :: dest | +Will contain the address of the buffer into which to copy. | +
| TYPE(C_PTR), VALUE :: src | +Will contain the address of the buffer from which to copy | +
| INTEGER(size_t) :: size | +Will contain the number of bytes to copy. | +
| INTEGER :: file_image_op | +Will be set to one of the values of H5_IMAGE_OP_* indicating the operation being performed on the file image when this callback is invoked. | +
| TYPE(C_PTR), VALUE :: udata | +Will be set to the value passed in for the udata parameter to H5Pset_file_image_callbacks_f. | +
| TYPE(C_FUN_PTR), VALUE :: image_memcpy | +Shall contain a pointer to a function with functionality identical to the standard C library memcpy() call. | +
FUNCTION op_func(ptr, size, & file_image_op, udata) RESULT(image_realloc) +
| TYPE(C_PTR), VALUE :: ptr | +Will contain the pointer to the buffer being reallocated | +
| INTEGER(size_t) :: size | +Will contain the desired size of the buffer after realloc in bytes. | +
| INTEGER :: file_image_op | +Will be set to one of the values of H5_IMAGE_OP_* indicating the operation being performed on the file image when this callback is invoked. | +
| TYPE(C_PTR), VALUE :: udata | +Will be set to the value passed in for the udata parameter to H5Pset_file_image_callbacks_f. | +
| TYPE(C_FUN_PTR), VALUE :: image_realloc | +Shall contain a pointer to a unction functionality identical to the standard C library realloc() call. | +
FUNCTION op_func(ptr, file_image_op, udata) RESULT(image_free) +
| TYPE(C_PTR), VALUE :: ptr | +Will contain the pointer to the buffer being released. | +
| INTEGER :: file_image_op | +Will be set to one of the values of H5_IMAGE_OP_* indicating the operation being performed on the file image when this callback is invoked. | +
| TYPE(C_PTR), VALUE :: udata | +Will be set to the value passed in for the udata parameter to H5Pset_file_image_callbacks_f. | +
| TYPE(C_PTR), VALUE :: image_free | +Shall contain a pointer to a function with functionality identical to the standard C library free() call | +
FUNCTION op_func(udata) RESULT(udata_copy) +
| TYPE(C_PTR), VALUE :: udata | +Will be set to the value passed in for the udata parameter to H5Pset_file_image_callbacks_f. | +
| TYPE(C_FUN_PTR), VALUE :: udata_copy | +Shall contain a pointer to a function that will allocate a buffer of suitable size, copy the contents of the supplied udata into the new buffer, and return the address of the new buffer. The function will return C_NULL_PTR on failure. | +
FUNCTION op_func(udata) RESULT(udata_free) +
| TYPE(C_PTR), VALUE :: udata | +Shall contain a pointer value, potentially to user-defined data, that will be passed to the image_malloc, image_memcpy, image_realloc, and image_free callbacks. | +
The signature of H5Pset_file_image_callbacks_f is defined as follows:
+SUBROUTINE H5Pset_file_image_callbacks_f(fapl_id, &callbacks_ptr, hdferr) +The parameters are defined as follows:
+INTEGER(hid_t), INTENT(IN) :: fapl_id |
+Will contain the ID of the target file access property list. | +
TYPE(H5_file_image_callbacks_t), INTENT(IN) :: callbacks_ptr |
+Will contain the callback derived type. callbacks_ptr shall contain a pointer to the Fortran function via the intrinsic functions C_LOC(X) and C_FUNLOC(X). | +
INTEGER, INTENT(OUT) :: hdferr |
+Will return the error status: 0 for success and -1 for failure. | +
The H5Pget_file_image_callbacks_f routine is designed to obtain the current file image callbacks from a file access property list.
+The signature is defined as follows
+SUBROUTINE H5Pget_file_image_callbacks_f(fapl_id, callbacks_ptr, hdferr) +The parameters are defined as follows:
+| INTEGER(hid_t), INTENT(IN) :: fapl_id | +Will contain the ID of the target file access property list. | +
| TYPE(H5_file_image_callbacks_t), INTENT(OUT) :: callbacks_ptr | +Will contain the callback derived type. Each member of the derived type shall have the same meaning as its C counterpart. See section 2.1.4 for more information. | +
| INTEGER, INTENT(OUT) :: hdferr | +Will return the error status: 0 for success and -1 for failure. | +
Implementation of the H5Pget/set_file_image_callbacks_f() and H5Pget/set_file_image_f() APIs requires a pair of new virtual file driver feature flags:
+H5FD_FEAT_LET_IMAGE_F +H5FD_FEAT_LET_IMAGE_CALLBACK_F +See the “Virtual File Driver Feature Flags” section for more information.
+ +The signature of H5Fget_file_image_f shall be defined as follows:
+SUBROUTINE H5Fget_file_image_f(file_id, buf_ptr, buf_len, hdferr, buf_size) +The parameters of H5Fget_file_image_f are defined as follows:
+| INTEGER(hid_t), INTENT(IN) :: file_id | +Will contain the ID of the target file. | +
| TYPE(C_PTR), INTENT(IN) :: buf_ptr | +Will contain a C pointer to the buffer into which the image of the HDF5 file is to be copied. If buf_ptr is C_NULL_PTR, no data will be copied. | +
| INTEGER(size_t), INTENT(IN) :: buf_len | +Will contain the size in bytes of the supplied buffer. | +
| INTEGER(ssizet_t), INTENT(OUT), OPTIONAL :: buf_size | +Will indicate the buffer size required to store the file image (in other words, the length of the file). If only the buf_size is needed, then buf_ptr should be also be set to C_NULL_PTR | +
| INTEGER, INTENT(OUT) :: hdferr | +Returns the error status: 0 for success and -1 for failure. | +
SUBROUTINE H5LTopen_file_image_f(buf_ptr, buf_len, flags, file_id, hdferr) +The parameters of H5LTopen_file_image_f are defined as follows:
+| TYPE(C_PTR), INTENT(IN), VALUE :: buf_ptr | +Will contain a pointer to the supplied initial image. A C_NULL_PTR value is invalid and will cause H5LTopen_file_image_f to fail. | +
| INTEGER(size_t), INTENT(IN) :: buf_len | +Will contain the size of the supplied buffer. A value of 0 is invalid and will cause H5LTopen_file_image_f to fail. | +
| INTEGER, INTENT(IN) :: flags | +Will contain a set of flags indicating whether the image is to be opened read/write, whether HDF5 is to take control of the buffer, and how long the application promises to maintain the buffer. Possible flags are as follows: H5LT_IMAGE_OPEN_RW_F, H5LT_IMAGE_DONT_COPY_F, and H5LT_IMAGE_DONT_RELEASE_F. The C equivalent flags are defined in the “H5LTopen_file_image” section. | +
| INTEGER(hid_t), INTENT(IN) :: file_id | +Will be a file ID on success. | +
| INTEGER, INTENT(OUT) :: hdferr | +Returns the error status: 0 for success and -1 for failure. | +
Address of Member File N
This field Specifies the virtual address at which the member file starts.
+This field specifies the virtual address at which the member file starts.
N is the number of member files.
A description of the rationale that leads to the present implementation of the extensible array can be found at - - https://svn.hdfgroup.org/hdf5doc/trunk/projects/1_10_alpha/ReviseChunks/skip_lists. + + https://github.com/HDFGroup/hdf5doc/tree/master/projects/1_10_alpha/ReviseChunks/skip_lists.
The current implementation differs from the data structure diff --git a/doxygen/examples/LibraryReleaseVersionNumbers.html b/doxygen/examples/LibraryReleaseVersionNumbers.html new file mode 100644 index 00000000000..57b211cd61b --- /dev/null +++ b/doxygen/examples/LibraryReleaseVersionNumbers.html @@ -0,0 +1,318 @@ + +
+HDF5 software is updated on a regular basis. These updates, known +as releases, range in scope and size from small to large. Some updates +may only fix bugs, and some updates may require a change in the format +of the data file. The version numbers that are applied to updates give +information about the kinds of changes made in the updates. This Tech +Note describes what the version numbers mean.
+ +Note that this document describes release version numbers for the +HDF5 Library. For more information, see the +Shared Library Version Numbers section at the end of this document.
+ +Each software release of the HDF5 Library is labeled with a version + number. The version number is a set of three integers written as HDF5-1.2.3, + HDF5 version 1.2 release 3, or HDF5 Release 1.2.3. The version number + might also include text. A patch version might be labeled HDF5-1.2.3-patch1. + The '5' in "HDF5" is part of the product name and will not change during + the life of the project.
+ +The key components in HDF5 Library version numbers are the major version + number, the minor version number, the release number, and an optional text + string.
+ +The first integer in a version number is the major version + number. This integer increments when there is an extensive change + to the file format or library API. Such a change may require files to + be translated and will likely require applications to be modified.
+ +The second integer, 2 in the examples above, is the minor version + number. This number is incremented when there are new features that + require a change in the file format. For example, a change in file format + was required during the change from version 1.6 to version 1.8. Stable + released versions of the library are given even minor version + numbers such as 1.6 and 1.8 while odd minor version numbers such + as 1.7 and 1.9 are used on the trunk for major development. See the + section below for more information.
+ +The third integer, 3 in the examples above, is the release + number. A change in this number indicates that the library has + been updated. The updates might include bug fixes, performance + improvements, and new features that do not require a file format + change.
+ +A version number might also include some text. The two current + possibilities are patch and snap. A patch version might + be made to a released version to make available a feature or a bug + fix. In the figure below, a patch to the 1.8.5 release is labeled + 1.8.5-patch1. A snapshot is an intermediate posting of the software + in a branch or in the trunk. Snapshots are made available so that users + may begin to test changes in the software that affect their software. + The changes may range from bug fixes to new features. Snapshots are made + and released regularly. How regularly depends on whether the software + passes the tests done on each build. A possible version number for a + snapshot might be 1.9-snap81. This version would hold the 81st snapshot + off the 1.9 development branch (the current trunk). For the + snapshots are available at + https://github.com/HDFGroup/hdf5/releases/tag/snapshot.
+ +The HDF Group uses a version control system to manage the HDF5 + project. Within the system, a trunk and branches are used to track + changes. The version numbers described above identify where a given + piece of software was produced in the system. The figure below shows + the general scheme.
+ +|
+ + ![]() |
+
|
+ + Figure 1. The trunk, release branches, and feature branches + |
+
The trunk is the center of the system. New features are + implemented in feature branches and aggregated in the trunk. + Release branches are then created from the trunk.
+ +The minor version number of the trunk is always an odd number. From + the time of Release 1.8.0 to the first 1.10 release, the trunk will be + version 1.9. The trunk was version 1.7 from the time of release 1.6.0 + until the first 1.8 release.
+ +Projects that add new features, bug fixes, and performance improvements + are developed on feature branches. When a project is completed, + its feature branch is merged into the trunk. In the figure above, the + merging of a feature branch is represented by a dashed arrow from the + feature branch to the trunk. If a feature requires a file format change, + then the feature will stay in the trunk until the next significant + release. This would mean in the figure above that the new feature would + be released in a future 1.10 release branch. If a feature does not + require a file format change, then it might be merged into one or more + release branches. This would mean in the figure above that the new + feature could be merged into the 1.8 branch and could be included in + the 1.8.6 release. If the feature was added to the 1.8.5 branch, then a + patch version might be released.
+ +Release branches hold software that is distributed to general + users. In the figure above, a few release branches are shown below the + trunk. Work is done in release branches for a period of time. Branches + further from the trunk have less work done in them. For example, a patch + branch such as 1.8.5-patch1 may contain only one or two changes. A release + branch such as 1.8.5 may contain a number of bug fixes and new functions, + but these changes are small in number compared to the number of changes in + the 1.8 branch.
+ +We aim to make available to the public two maintenance releases a year. + The releases occur usually in the spring near May 15 and in the fall near + November 15. If two release branches are being maintained, then + maintenance releases may be made for each release branch. For example, + there was a time when both the 1.6 and 1.8 branches were actively + maintained. In one maintenance release, the 1.6.10 and 1.8.4 versions were + released at the same time. The 1.6 and 1.8 branches were both actively + maintained to give early adopters access to new features and to give most + users plenty of time to make the change to 1.8 software from 1.6.
+ +As we improve any branch, we consider the effect of any change on the + readability of objects. Applications built, for example, with version + 1.8.5 will be able to read data files written with any prior version + of the library. So, a 1.8.5 application will be able to read a dataset + written with 1.4.5. A 1.8.5 application may be able to read a dataset + written under the 1.8.7 library if no new features, features not known + to 1.8.5, were used. + +
The library provides macros and functions to query and check + version numbers.
+ +The following constants are defined in the file H5public.h
+ and determine the version of the include files.
H5_VERS_MAJORH5_VERS_MINORH5_VERS_RELEASEH5_VERS_SUBRELEASEH5_VERS_INFOThe table below describes some of the function calls and macros + that can be used to query and check version numbers.
+ +| + Table 1. Version function calls and macros | +|
| + Function Call or Macro | ++ Comments | +
H5get_libversion |
+ This function returns through its arguments the version + numbers for the library to which the application is linked. | +
H5check |
+ This macro uses the H5check_version function
+ to verify that the version number of the HDF5 include file used
+ to compile the application matches the version number of the
+ library to which the application is linked. This check occurs
+ automatically when the first HDF5 file is created or opened and
+ is important because a mismatch between the include files and the
+ library is likely to result in corrupted data and/or segmentation
+ faults. If a mismatch is detected, the library issues an error
+ message on the standard error stream and aborts. |
+
H5check_version |
+ This function is called by the The behavior of this function can be modified by the
+ |
+
H5_VERSION_GE and
+ H5_VERSION_LE |
+ These macros compare the version of the HDF5 library being used + against the version number specified in the parameters. At compile + time, they can be used to conditionally include or exclude code + based on the library's version. | +
H5Pset_libver_bounds |
+ This function can be used to control the versions of the object + formats that will be used when creating objects in a file. | +
For more information on these and other function calls and macros, + see the HDF5 Reference Manual.
+ +The purpose of this section is to describe how some of the version + functions, macros, and constants might be used.
+ +Suppose first that a developer builds an application that will read
+ from and write to an HDF5 file. When the application is compiled, a
+ version of the HDF5 Library such as 1.8.6 will be used. The version
+ constants (H5_VERS_MAJOR, H5_VERS_MINOR,
+ and H5_VERS_RELEASE) are included in the application when
+ it is compiled.
Suppose next that a user gets a copy of the application and starts it
+ up on a workstation. The executable is put into memory along with the
+ HDF5 Library. However, an application may only work successfully with
+ the version of the library with which the application was compiled. In
+ other words, the version of the library that is loaded when the applicati=
+on
+ is started must be the same version as the version of the library with
+ which the application was compiled. This is verified by the library when
+ the first HDF5 API routine is called. If an application wants to confirm
+ early in its startup procedure that the version of the library that will
+ be loaded into memory at the workstation will work with the application,
+ then it can use the H5get_libversion and
+ H5check_version function calls.
The H5_VERSION_GE and H5_VERSION_LE version
+ macros compare the version of the HDF5 Library being used against the
+ version number specified in the parameters. At compile time, they can be
+ used to conditionally include or exclude code based on the library's
+ version. For example, the link functions, H5Lxxx, are
+ new in version 1.8, and some group functions, H5Gxxx,
+ are deprecated in 1.8. With the H5_VERSION_GE macro, an
+ application could use H5Ldelete if the library version is
+ 1.8.0 or greater, or it could use H5Gunlink if the library
+ version is less than 1.8.0.
Suppose a data file has three datasets. It is possible that the three
+ datasets were added to the data file with applications using different
+ versions of HDF5. The different versions could be 1.4.5, 1.6.10, and
+ 1.8.6. If another dataset is written to the data file, then it will be
+ written by default in the oldest format possible that has all of the
+ features needed to successfully write the dataset. If a newer feature
+ such as compact storage, a new parameter for a function, or a partially
+ compressed dataset is used, then a newer format will be used.
+ H5Pset_libver_bounds could be used to specify the oldest
+ format used. In the situation above, the owners of the data file might
+ want all data written to the file in the future to be in a 1.8 format
+ rather than 1.6 or 1.4.
HDF5 shared libraries utilize the + +libtool versioning system in order to indicate interface +compatibility between maintenance releases of HDF5. While we always +attempt to maintain interface compatibility between minor maintenance +release versions of HDF5, if we are forced to break interface +compatibility in order to resolve a critical defect within the +library, then the library interface version attached to the shared +libraries for a given release will be incremented accordingly.
+ +Please note that this libtool version number for interface +compatibility is unrelated to the HDF5 release version for a given +release.
+ + + diff --git a/doxygen/examples/intro_SWMR.html b/doxygen/examples/intro_SWMR.html index f4cd586f5f8..b1adb62bdb5 100644 --- a/doxygen/examples/intro_SWMR.html +++ b/doxygen/examples/intro_SWMR.html @@ -17,8 +17,8 @@
+
*/
diff --git a/doxygen/img/trunk_branches.jpg b/doxygen/img/trunk_branches.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..d373c31e032fd3fb884fe341b0f31665b23951ae
GIT binary patch
literal 51564
zcmeEv2UrwY)^;HXiXuvqAVGpC2nb3PXc5VSEjfddgXAcwMFa%NC=4JVIfLXJBuJ8+
zBukRegeEsl)BP8-`^`Ge?yNIAyI=TepTer@Tes?-I`^FSp48Y+*w4UuSxFg500##L
zcnJOju+!()BwWml0YF|JU;_Z)6o7|w8#n>(odpkM{mcM7a32TUSA7$A^gloe0Oz}w
zF98JLIj{{N3U0uqW$@3bqrKzLF$In(a7=+?3LI15m;(PlQb5A#k(K>*2Kh&J765QE
z6!#}IK?b6Rlu*2%_she>e%i<75d?tn@W1W<4OyJ}@rZiI$m0J;9y%WLF$In(a7=+?
z3LI15ZxrCU!Obmn*21`t~y$cVIR}ETRoOGUcQQjItFG$!Ph7@rt2>817 z158FKZ}jq(NuO~AYb*&njQQ}IQI9TBx6@Zm@VdI-(H z+&uTItMy)^_?;F^k|3!|v+?Ik7*q{Z5iUhIfy3R>;CD(itH-N{kOy8&x_}?*0}fz) zr)9t7rQmq}@Tb~U-X3mr^IGAD3Vl%128Bnl|KVnDr#%_z$V#UcG#PkaB2}nAs=*?H zTtj2=l^k}&^B_rrHkjW?2N~UFo;KhN LYz>oj9xeoeeR`XQ1o0=bUSm6 ziIc$_^(O(YXK{&R?y)|8!!0#sk&3OHWMX))_aC$|erv-_1)F1%Qwl;$sCS_yr+Q2E zV1=$(%?lcKPU2YXR=$@${25dP5SH2y6OXOA)F&&K-7PtVn^|3u2=;N#4l31R((4P* zLL1^OT+u0xz(I;YE0fvSL9|HF3BL^@;za;Oq;&0Lh72~2)%9mwi!E#Y7^IyF_p@j2 zITiCwbE#It${fYc^b~?ZFYL0^Qh8)Vyuv2d$Kl|EhKLCxd+&SK=1*Ry)M0X{q#i{j zjR=QT=0AGHGpZwwPC)XjvhDRNK`g;Re}&Pka+en^T+>Tg+Q)a@75V85YEQ!c?X)Zk z-}EG=!z#0{X33L*!V{wxBPzS93f$_5bU+>OyCSz%B{6xyc>S9G^n%ohJTZ}KMZQQ^ zicmUGZ@nRElsUj958V5lF`P2c^X!b)MRHQe+KyB&^`2akTK49?oYlNAzAU-Yz{`O@ z>x7?)r|%N^^ey2bykh(3%A1r_WVfykteSbQmgKwsq!fYg7(u-yjJ30^!@{5J;Wyua zGKG{L2i6he>x|?UyWHF-I=N?eKlhC{KJ~Qp)hrn;LkzdgIL@>YIN7$Pl&z~C+#1a~ zrnt0BN%aI`p6&MTZ28@96#E8TKVjVdE}LzN%lwU-t^8g_>8GB*G~up@m)YSzuaCcQ zBcdsLJM02DRu>LI;SekGZLsp0n1@+MM5?RFtF`Zz(3%cjE6z*6&3vS)9;%XjR6;$U z?%Ka_ID9AdjB(@Ud}`BHoVvofLrD9Vu39n#Ict_!N6--YEckAsVAN_1TK{lv8A=;u z(_OL) ExJ>eqTMh84llc+y1$yt-@Lz^|v`Y z{TFe#d|3 {7?1Vn3tQ*DNZA8y(BS>2igg@WI>J0vcybr&m!4I_^HJ zpjm9jUtIpZX(^3{M5N%%=5;@KA+k|5P5mx1?Uk#h=rM-CmOG!>$D9+4SB%!zW}G%# zzl9mS)UZOiWVTb9Mp4M^=2)HUz8s-q|In-Mu8-pq|CalIGEDU!=JJ`lcIJAx;0U2= zz@T-mFPcmEvHrFfui}lj3*&mLEP8L0ep#CoVbNLinR!Gss@a(^xQ?~`(1r}Wb lDp@ir+4{N~i=q`sw7E#5liNxg3na4o(?pMAd3NIV` zu>|C~8)C)NBx4@DYa_+j5-1^idl6jf=_OtUF9sCm3fe0Ou#X+YW&qZT^9S!e3P7O` zLTTfx%i&00=1>DDS$LyO!WAEWVxGf& - zyp`DA$_`k97COb7R_sRQ(PjoO0So*bG%jzvMI@UU>d{hD37P=#NUf0tWLOA+&o*C* zP=M-Ou;Xk%ccn$w&Jy!LiAq#5QpDDh@RpYtvW7ffnD2O9IwV}SP^7-qn?SNKg)H zrp2QOzl9IiOA*~j7*#y#jqN=G3Chw2>LAu^DPrgcYfcD60vkjWe9e6g;-`C|`w*Kv zCJ)fYNbF<>f}_i@eFi`e_!fAkXAB%RQ8s7&`)Yu$7vv1fPiogYBaG|u%QC$4rS~p< z*+d7bsqzX{OIU}lS(+N)Cip>&(>s|zKOi_ZY1PAhNqfq^J!FO45+jP)?Y=~aSIWxT z9Cgz@&Jjbao^MN+!`R)^AoUdGC<>!H%3apAx)^PKv+%6VvtrGg8bve6KAda|^XrKV zn9aSI<;~8EQ|g)lee}@4d%t(8U8hE9 z#ttbW zzTO(4#jAtB!qevocoOpdu$k@jPp122dN54?Nv3Cp>FIEKnV4Q1rwxK>L+Ml2VSvl) l!mKc+M`5!`7Mbc}_QjUQgLVSntuaRtN-9bdSell!?H8a-M#umF literal 0 HcmV?d00001 diff --git a/fortran/src/README.md b/fortran/src/README.md index 26374128b65..e36a95ea2f5 100644 --- a/fortran/src/README.md +++ b/fortran/src/README.md @@ -109,7 +109,7 @@ FOR DEVELOPERS The valid KINDs for integers and reals that are stored in H5config_f.inc are used in the H5_buildiface.F90 file located in the fortran/src directory. During the build process, H5_buildiface.F90 generates all the valid F90 KIND interfaces for the following APIs: h5awrite_f, h5aread_f, h5dwrite_f, h5dread_f, h5pset_fill_value_f, h5pget_fill_value_f, h5pset_f, h5pget_f, h5pregister_f, and h5pinsert_f. These APIs can handle up to and including rank seven arrays for all the found KINDs. Again, it's important to note that no new Fortran APIs should be added to H5_buildiface.F90 since new Fortran APIs should not use F90 specification but should instead use F2003. The source file generated by H5_buildiface.F90 is H5_gen.F90, which is the Fortran module H5_GEN, Figure 1. This module is included in the HDF5 module HDF5.F90. -  + Procedure to add a new function -------------------------------- diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c index bd03146b6da..49786e2d8ac 100644 --- a/hl/src/H5DO.c +++ b/hl/src/H5DO.c @@ -80,20 +80,6 @@ H5DOread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *fi * * Return: Non-negative on success/Negative on failure * - * Note: - * This routine is copied from the fast forward feature branch: features/hdf5_ff - * src/H5FF.c:H5DOappend() with the following modifications: - * 1) Remove and replace macro calls such as - * FUNC_ENTER_API, H5TRACE, HGOTO_ERROR - * accordingly because hl does not have these macros - * 2) Replace H5I_get_type() by H5Iget_type() - * 3) Replace H5P_isa_class() by H5Pisa_class() - * 4) Fix a bug in the following: replace extension by size[axis] - * if(extension < old_size) { - * ret_value = FAIL; - * goto done; - * } - * *------------------------------------------------------------------------- */ herr_t diff --git a/hl/src/H5DOpublic.h b/hl/src/H5DOpublic.h index 887e65973e2..5054178846b 100644 --- a/hl/src/H5DOpublic.h +++ b/hl/src/H5DOpublic.h @@ -161,7 +161,7 @@ H5_HLDLL herr_t H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t e * from one datatype to another, and the filter pipeline to write the chunk. * Developers should have experience with these processes before * using this function. Please see - * + * * Using the Direct Chunk Write Function * for more information. * diff --git a/hl/src/H5LTpublic.h b/hl/src/H5LTpublic.h index 1ce5c81d3e2..343f5272453 100644 --- a/hl/src/H5LTpublic.h +++ b/hl/src/H5LTpublic.h @@ -1387,7 +1387,7 @@ H5_HLDLL herr_t H5LTget_attribute_info(hid_t loc_id, const char *obj_name, const * Currently, only the DDL(#H5LT_DDL) is supported. * The complete DDL definition of HDF5 datatypes can be found in * the last chapter of the - * + * * HDF5 User's Guide. * * \par Example @@ -1425,7 +1425,7 @@ H5_HLDLL hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type); * Currently only DDL (#H5LT_DDL) is supported for \p lang_type. * The complete DDL definition of HDF5 data types can be found in * the last chapter of the - * + * * HDF5 User's Guide. * * \par Example @@ -1625,7 +1625,7 @@ H5_HLDLL htri_t H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_obj * \note **Recommended Reading:** * \note This function is part of the file image operations feature set. * It is highly recommended to study the guide - * + * * HDF5 File Image Operations before using this feature set.\n * See the “See Also” section below for links to other elements of * HDF5 file image operations. diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c index 2e6071c007b..b4dd62fd70c 100644 --- a/hl/tools/h5watch/h5watch.c +++ b/hl/tools/h5watch/h5watch.c @@ -785,13 +785,13 @@ main(int argc, char *argv[]) h5tools_init(); /* To exit from h5watch for SIGTERM signal */ - if (HDsignal(SIGTERM, catch_signal) == SIG_ERR) { + if (signal(SIGTERM, catch_signal) == SIG_ERR) { error_msg("An error occurred while setting a signal handler.\n"); leave(EXIT_FAILURE); } /* To exit from h5watch for SIGINT signal */ - if (HDsignal(SIGINT, catch_signal) == SIG_ERR) { + if (signal(SIGINT, catch_signal) == SIG_ERR) { error_msg("An error occurred while setting a signal handler.\n"); leave(EXIT_FAILURE); } diff --git a/java/src/hdf/overview.html b/java/src/hdf/overview.html index 8a9d38f249a..74907555534 100644 --- a/java/src/hdf/overview.html +++ b/java/src/hdf/overview.html @@ -91,6 +91,6 @@ The H5 class automatically loads the native method implementations and the HDF5 library. To Obtain
-The JHI5 is included with the HDF5 library. +The JHI5 is included with the HDF5 library.