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 |
The C Interfaces:
The FORTRAN90 Interfaces:
In general, each FORTRAN90 subroutine performs exactly the same task
as the corresponding C function. The links below go to the C function
descriptions, which serve as general descriptions for both. A button,
under Non-C API(s) at the end of the C function description,
opens an external browser window displaying the FORTRAN90-specific
information. You will probably want to adjust the size and location of
this external window so that both browser windows are visible and to
facilitate moving easily between them.
|
H5open
(void)
H5open
initialize the library. This function is
normally called automatically, but if you find that an
HDF5 library function is failing inexplicably, try calling
this function first.
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.
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.
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).
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.
majnum
minnum
relnum
H5check_version
(unsigned majnum
,
unsigned minnum
,
unsigned relnum
)
H5check_version
verifies that the arguments provided
with the function call match the version numbers compiled into
the library.
H5check_version
serves two slightly differing purposes.
First, the function is intended to be called by the user to verify
that the version of the header files compiled into an application
matches the version of the HDF5 library being used.
One may look at the H5check
definition in the file
H5public.h
as an example.
Due to the risks of data corruption or segmentation faults,
H5check_version
causes the application to abort if the
version numbers do not match.
The abort is achieved by means of a call to the
standard C function abort()
.
Note that H5check_version
verifies only the
major and minor version numbers and the release number;
it does not verify the sub-release value as that should be
an empty string for any official release.
This means that any two incompatible library versions must
have different {major,minor,release} numbers. (Notice the
reverse is not necessarily true.)
Secondarily, H5check_version
verifies that the
library version identifiers H5_VERS_MAJOR
,
H5_VERS_MINOR
, H5_VERS_RELEASE
,
H5_VERS_SUBRELEASE
, and H5_VERS_INFO
are consistent.
This is designed to catch source code inconsistencies,
but does not generate the fatal error as in the first stage
because this inconsistency does not cause errors in the data files.
If this check reveals inconsistencies, the library issues a warning
but the function does not fail.
majnum
minnum
relnum
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 |