Please, help us to better serve our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/
HDF5 2.0.0.edb930f
API Reference
Loading...
Searching...
No Matches
src Directory Reference

Files

 H5_buildiface.F90
 
 H5_ff.F90
 
 H5Aff.F90
 
 H5Dff.F90
 
 H5Eff.F90
 
 H5ESff.F90
 
 H5f90global.F90
 
 H5Fff.F90
 
 H5fortkit.F90
 
 H5Gff.F90
 
 H5Iff.F90
 
 H5Lff.F90
 
 H5Off.F90
 
 H5Pff.F90
 
 H5Rff.F90
 
 H5Sff.F90
 
 H5Tff.F90
 
 H5VLff.F90
 
 H5Zff.F90
 
 HDF5.F90
 

Detailed Description

This directory contains Fortran APIs for HDF5 Library functionality. A complete list of implemented Fortran subroutines can be found in the HDF5 Reference Manual.

About the source code organization

The Fortran APIs are organized in modules parallel to the HDF5 Interfaces. Each module is in a separate file with the name H5*ff.F90. Corresponding C stubs are in the H5*f.c files. For example, the Fortran File APIs are in the file H5Fff.F90, and the corresponding C stubs are in the file H5Ff.c.

Each module contains Fortran definitions of the constants, interfaces to the subroutines if needed, and the subroutines themselves.

It is crucial for users to use constant names in their programs instead of the numerical values, as the constant names have values which are subject to change without notice.

Quick overview of the Fortran APIs

FOR DEVELOPERS

Figure 1: During the configure and build phases, Fortran files are generated and compiled. This overview explains the flow steps of the build process.

Procedure to add a new function

Important
The use of C stubs (H5*f.c) is no longer recommended. The C APIs should now be called from Fortran wrappers. C wrappers description exists for maintenance purposes and to create and understand alternative development options.
  1. Edit the fortran/src/H5*ff.F90 file
  2. Edit the fortran/src/H5*f.c file
  3. Edit the fortran/src/H5f90proto.h file
  4. Add the new function to fortran/src/hdf5_fortrandll.def.in

Procedure for passing C variables to Fortran

(1) Find the C struct name you are interested in:

    (a) src/H5public.h if it is a generic type, i.e. H5_*
        or
    (b) src/H5*public.h if is a specific type, i.e. H5*_

(2) Put that structure into an array that will be passed to Fortran in:

    (a) fortran/src/H5_f.c (add to the h5init_flags_c subroutine)
    (b) edit fortran/src/H5f90proto.h and edit h5init_flags_c interface call

(3) Edit the function call in fortran/src/H5_ff.F90

    (a) edit the call:  FUNCTION h5init_flags_c
    (b) edit h5init_flags_c call in h5open_f to match the number of arguments being passed

(4) Add the size of the array and array to fortran/src/H5f90global.F90, it must match the size found in H5_f.c

Note
To add a default C value argument, do steps (2a) and (4).

Procedure for adding a new file to the repository

Add the name of the file to the: (1) CMakeLists.txt located in the same directory as the new file.