Name: H5check_version
Signature:
  herr_t `H5check_version`(unsigned `majnum`, unsigned `minnum`, unsigned `relnum` )
Purpose:
  Verifies that library versions are consistent.
Description:
  `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.

Parameters:

unsigned `majnum` | IN: The major version of the library.
unsigned `minnum` | IN: The minor version of the library.
unsigned `relnum` | IN: The release number of the library.

Returns:
  Returns a non-negative value if successful. Upon failure, this function causes the application to abort.
Fortran90 Interface: h5check_version_f

      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

History:

Release | Fortran90
1.4.5 | Function introduced in this release.