HDF5 documents and links Introduction to HDF5 HDF5 User Guide |
And in this document, the
HDF5 Reference Manual H5 H5A H5D H5E H5F H5G H5I H5P H5R H5S H5T H5Z Tools Datatypes Collective Calls in Parallel |
(PDF of complete manual formatted as print volume) |
The C Interfaces:
H5check_version
(
unsigned majnum
,
unsigned minnum
,
unsigned relnum
)
H5check_version
verifies that the version of the HDF5
library with which an application was compiled, as indicated by
the passed parameters, matches the version of the HDF5 library
against which the application is currently linked.
majnum
is the major version number of the HDF library
with which the application was compiled,
minnum
is the minor version number, and
relnum
is the release number.
Consider the following illustration:
HDF5 Release <majnum
>.<minnum
>.<relnum
>
majnum
.
minnum
.
relnum
.
As stated above,
H5check_version
first verifies that the version
of the HDF5 library with which an application was compiled
matches the version of the HDF5 library against which the
application is currently linked.
If this check fails, H5check_version
causes the
application to abort
(by means of a standard C abort()
call)
and prints information that is usually useful for debugging.
This precaution is is taken to avoid the risks of data corruption
or segmentation faults.
The most common cause of this failure is that an application was compiled with one version of HDF5 and is dynamically linked with a different version different version.
If the above test passes, H5check_version
proceeds to
verify the consistency of additional library version information.
This is designed to catch source code inconsistencies that
do not normally cause failures;
if this check reveals an inconsistency, an informational warning
is printed but the application is allowed to run.
unsigned majnum |
IN: HDF5 library major version number. |
unsigned minnum |
IN: HDF5 library minor version number. |
unsigned relnum |
IN: HDF5 library release number. |
SUBROUTINE h5check_version_f(hdferr) IMPLICIT NONE INTEGER, INTENT(IN) :: majnum ! The major version of the library INTEGER, INTENT(IN) :: minnum ! The minor version of the library INTEGER, INTENT(IN) :: relnum ! The release number INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5check_version_f
Release | Fortran90 |
1.4.5 | Function introduced in this release. |
H5close
(void)
H5close
flushes all data to disk,
closes all file identifiers, and cleans up all memory used by
the library. This function is generally called when the
application calls exit()
, but may be called earlier
in event of an emergency shutdown or out of desire to free all
resources used by the HDF5 library.
h5close_f
and h5open_f
are
required calls in Fortran90 applications.
SUBROUTINE h5close_f(hdferr) IMPLICIT NONE INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5close_f
H5dont_atexit
(void)
atexit
cleanup routine.
H5dont_atexit
indicates to the library that an
atexit()
cleanup routine should not be installed.
The major purpose for this is in situations where the
library is dynamically linked into an application and is
un-linked from the application before exit()
gets
called. In those situations, a routine installed with
atexit()
would jump to a routine which was
no longer in memory, causing errors.
In order to be effective, this routine must be called before any other HDF function calls, and must be called each time the library is loaded/linked into the application (the first time and after it's been un-loaded).
SUBROUTINE h5dont_atexit_f(hdferr) IMPLICIT NONE INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5dont_atexit_f
Release | Fortran90 |
1.4.5 | Function introduced in this release. |
H5garbage_collect
(void)
H5garbage_collect
walks through all the garbage
collection routines of the library, freeing any unused memory.
It is not required that H5garbage_collect
be called
at any particular time; it is only necessary in certain situations
where the application has performed actions that cause the library
to allocate many objects. The application should call
H5garbage_collect
if it eventually releases those
objects and wants to reduce the memory used by the library from
the peak usage required.
The library automatically garbage collects all the free lists when the application ends.
SUBROUTINE h5garbage_collect_f(hdferr) IMPLICIT NONE INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5garbage_collect_f
Release | Fortran90 |
1.4.5 | Function introduced in this release. |
H5get_libversion
(unsigned *majnum
,
unsigned *minnum
,
unsigned *relnum
)
H5get_libversion
retrieves the major, minor, and release
numbers of the version of the HDF library which is linked to
the application.
unsigned *majnum |
OUT: The major version of the library. |
unsigned *minnum |
OUT: The minor version of the library. |
unsigned *relnum |
OUT: The release number of the library. |
SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, hdferr) IMPLICIT NONE INTEGER, INTENT(OUT) :: majnum ! The major version of the library INTEGER, INTENT(OUT) :: minnum ! The minor version of the library INTEGER, INTENT(OUT) :: relnum ! The release number INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5get_libversion_f
Release | Fortran90 |
1.4.5 | Function introduced in this release. |
H5open
(void)
H5open
initialize the library.
When the HDF5 Library is employed in a C application,
this function is normally called automatically, but if you
find that an HDF5 library function is failing inexplicably,
try calling this function first.
If you wish to elimnate this possibility, it is safe to
routinely call H5open
before an application
starts working with the library as there are no damaging
side-effects in calling it more than once.
When the HDF5 Library is employed in a Fortran90 application,
h5open_f
initializes global variables
(e.g. predefined types) and performs other tasks required to
initialize the library.
h5open_f
and h5close_f
are therefore
required calls in Fortran90 applications.
SUBROUTINE h5open_f(hdferr) IMPLICIT NONE INTEGER, INTENT(OUT) :: hdferr ! Error code END SUBROUTINE h5open_f
H5set_free_list_limits
(
int reg_global_lim
,
int reg_list_lim
,
int arr_global_lim
,
int arr_list_lim
,
int blk_global_lim
,
int blk_list_lim
)
H5set_free_list_limits
sets size limits
on all types of free lists.
The HDF5 library uses free lists internally to manage memory.
The types of free lists used are as follows:
The parameters specify global and per-list limits; for example,
reg_global_limit
and reg_list_limit
limit the
accumulated size of all regular free lists and the size of each
individual regular free list, respectively. Therefore, if an application
sets a 1Mb limit on each of the global lists, up to 3Mb of total storage
might be allocated, 1Mb for each of the regular, array, and block
type lists.
Using a value of -1
for a limit means that
no limit is set for the specified type of free list.
int reg_global_lim |
IN: The cumulative limit, in bytes,
on memory used for all regular free lists
(Default: 1MB) |
int reg_list_lim |
IN: The limit, in bytes,
on memory used for each regular free list
(Default: 64KB) |
int arr_global_lim |
IN: The cumulative limit, in bytes,
on memory used for all array free lists
(Default: 4MB) |
int arr_list_lim |
IN: The limit, in bytes,
on memory used for each array free list
(Default: 256KB) |
int blk_global_lim |
IN: The cumulative limit, in bytes,
on memory used for all block free lists
(Default: 16MB) |
int blk_list_lim |
IN: The limit, in bytes,
on memory used for each block free list
(Default: 1MB) |
Release | C |
1.6.0 | Function introduced in this release. |
HDF5 documents and links Introduction to HDF5 HDF5 User Guide |
And in this document, the
HDF5 Reference Manual H5 H5A H5D H5E H5F H5G H5I H5P H5R H5S H5T H5Z Tools Datatypes Collective Calls in Parallel |
(PDF of complete manual formatted as print volume) |