Skip to content

Commit

Permalink
format update
Browse files Browse the repository at this point in the history
  • Loading branch information
brtnfld committed Nov 10, 2023
1 parent 028a9b1 commit 95904f4
Showing 1 changed file with 13 additions and 22 deletions.
35 changes: 13 additions & 22 deletions fortran/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ Quick overview of the Fortran APIs
SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, &
hdferr, dset_creation_prp, link_creation_prp, dset_access_prop)

The first four parameters of the Fortran subroutine correspond to the
parameters of the C function. The fifth parameter, dset_id, is an output
parameter containing a valid dataset identifier, and the sixth
output parameter, hdferr, indicates successful completion.
The error code descriptions can be found in the subroutine descriptions
of the Reference Manual. The last three input parameters are optional
and can be omitted, in which case default values will be used.
The first four parameters of the Fortran subroutine correspond to the
parameters of the C function. The fifth parameter, dset_id, is an output
parameter containing a valid dataset identifier, and the sixth
output parameter, hdferr, indicates successful completion.
The error code descriptions can be found in the subroutine descriptions
of the Reference Manual. The last three input parameters are optional
and can be omitted, in which case default values will be used.

* Parameters to the Fortran subroutines typically include
predefined datatypes (see the build-time generated file
Expand Down Expand Up @@ -101,40 +101,31 @@ C wrappers description exists for maintenance purposes and to create and underst
Procedure to add a new function
--------------------------------

(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
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_\*

(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
(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).

Expand Down

0 comments on commit 95904f4

Please sign in to comment.