hdf5/fortran/src
2015-04-29 13:41:42 -05:00
..
CMakeLists.txt [svn-r26969] Added H5KINDff.F90 to output and moved to end of source list. 2015-04-29 13:41:42 -05:00
h5fc.in [svn-r26505] Merge r26435 from autotools_rework branch. 2015-03-20 14:04:30 -05:00
H5_f.c [svn-r26846] BIND(C) added to H5 general functions 2015-04-20 11:03:54 -05:00
H5_ff.F90 [svn-r26846] BIND(C) added to H5 general functions 2015-04-20 11:03:54 -05:00
H5Af.c [svn-r26886] Fixed source to avoid bug in gfortran < v4.7 Bug: 45190, 37829 2015-04-22 14:19:29 -05:00
H5Aff.F90 [svn-r26934] H5test_kind.F90 now generates all the interfaces for H5A, H5D, and H5P REAL interfaces depending on the KIND available. 2015-04-27 15:56:06 -05:00
H5config_f.inc.cmake [svn-r26885] Fixed issues with CMake and Fortran on linux. 2015-04-22 13:50:29 -05:00
H5config_f.inc.in [svn-r26917] added conditional for C_LONG_DOUBLE 2015-04-23 17:16:30 -05:00
H5Df.c [svn-r26866] Removed the default REAL and DOUBLE PRECESION dependency. 2015-04-21 11:53:40 -05:00
H5Dff.F90 [svn-r26934] H5test_kind.F90 now generates all the interfaces for H5A, H5D, and H5P REAL interfaces depending on the KIND available. 2015-04-27 15:56:06 -05:00
H5Ef.c [svn-r26819] Updated H5A, H5E, H5D, H5F APIs to F2003, added ifdef for parallel. 2015-04-15 17:03:33 -05:00
H5Eff.F90 [svn-r26819] Updated H5A, H5E, H5D, H5F APIs to F2003, added ifdef for parallel. 2015-04-15 17:03:33 -05:00
H5f90.h
H5f90global.F90 [svn-r26819] Updated H5A, H5E, H5D, H5F APIs to F2003, added ifdef for parallel. 2015-04-15 17:03:33 -05:00
H5f90i.h
H5f90kit.c
H5f90proto.h [svn-r26934] H5test_kind.F90 now generates all the interfaces for H5A, H5D, and H5P REAL interfaces depending on the KIND available. 2015-04-27 15:56:06 -05:00
H5Ff.c [svn-r26819] Updated H5A, H5E, H5D, H5F APIs to F2003, added ifdef for parallel. 2015-04-15 17:03:33 -05:00
H5Fff.F90 [svn-r26819] Updated H5A, H5E, H5D, H5F APIs to F2003, added ifdef for parallel. 2015-04-15 17:03:33 -05:00
H5Gf.c [svn-r26826] CHANGED H5G APIs to use BIND(C) 2015-04-16 14:04:43 -05:00
H5Gff.F90 [svn-r26826] CHANGED H5G APIs to use BIND(C) 2015-04-16 14:04:43 -05:00
H5If.c [svn-r26829] Added BIND(C) to the Fortran H5I APIs 2015-04-16 16:26:43 -05:00
H5Iff.F90 [svn-r26829] Added BIND(C) to the Fortran H5I APIs 2015-04-16 16:26:43 -05:00
H5Lf.c [svn-r26809] Changed Fortran file endings from ".f90" to ".F90" 2015-04-14 16:59:58 -05:00
H5Lff.F90 [svn-r26834] Added more BIND(C) to H5O Fortran APIs 2015-04-17 11:33:26 -05:00
H5match_types.c [svn-r26937] added generated Fortran file to Fortran CMakeList.txt 2015-04-28 10:11:12 -05:00
H5Of.c [svn-r26833] Added BIND(C) to H5O Fortran APIs 2015-04-17 11:23:52 -05:00
H5Off.F90 [svn-r26836] added BIND(C) to H5T APIs 2015-04-17 13:41:48 -05:00
H5Pf.c [svn-r26934] H5test_kind.F90 now generates all the interfaces for H5A, H5D, and H5P REAL interfaces depending on the KIND available. 2015-04-27 15:56:06 -05:00
H5Pff.F90 [svn-r26934] H5test_kind.F90 now generates all the interfaces for H5A, H5D, and H5P REAL interfaces depending on the KIND available. 2015-04-27 15:56:06 -05:00
H5Rf.c [svn-r26809] Changed Fortran file endings from ".f90" to ".F90" 2015-04-14 16:59:58 -05:00
H5Rff.F90 [svn-r26830] Added BIND(C) to Fortran H5R APIs. 2015-04-16 17:09:32 -05:00
H5Sf.c [svn-r26831] Added H5S BIND(C) 2015-04-17 11:01:16 -05:00
H5Sff.F90 [svn-r26831] Added H5S BIND(C) 2015-04-17 11:01:16 -05:00
H5test_kind.F90 [svn-r26950] Added DLL exports for windows. 2015-04-28 14:01:52 -05:00
H5Tf.c [svn-r26836] added BIND(C) to H5T APIs 2015-04-17 13:41:48 -05:00
H5Tff.F90 [svn-r26916] cleaned-up comments 2015-04-23 15:58:27 -05:00
H5Zf.c [svn-r26819] Updated H5A, H5E, H5D, H5F APIs to F2003, added ifdef for parallel. 2015-04-15 17:03:33 -05:00
H5Zff.F90 [svn-r26832] misc. clean-up 2015-04-17 11:03:14 -05:00
hdf5_fortrandll.def.in [svn-r26968] Removed H5A,H5D and H5P declarations which now use the KIND findings. 2015-04-29 13:37:53 -05:00
HDF5.F90 [svn-r26934] H5test_kind.F90 now generates all the interfaces for H5A, H5D, and H5P REAL interfaces depending on the KIND available. 2015-04-27 15:56:06 -05:00
Makefile.am [svn-r26952] Added dependencies for H5_KINDff.F90 2015-04-28 15:31:08 -05:00
Makefile.in [svn-r26952] Added dependencies for H5_KINDff.F90 2015-04-28 15:31:08 -05:00
README [svn-r26616] Removed reference to grpit.f90 since it was removed. 2015-03-27 10:40:55 -05:00
README_DEVELOPEMENT [svn-r24959] Updated the development procedures. 2014-04-03 15:51:16 -05:00

          README for the FORTRAN90 Prototype APIs to HDF5


This distribution contains the HDF5 FORTRAN90 APIs source code (prototype) 
based on the HDF5 1.2.2 release (ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current), 
tests and examples.

This prototype supports a selected subset of the HDF5 Library functionality. 
A complete list of the Fortran subroutines can be found in the HDF5 
Reference Manual provided with this release.
Check the online documentation at http://hdf.ncsa.uiuc.edu/HDF5/doc (select 
the "HDF5 Fortran90 Docs" link at the bottom of the left-hand column) or 
H5_F90.R1.2.2.RefMan.tar at ftp://hdf.ncsa.uiuc.edu/HDF5/fortran .

Changes since last release (October 1999)
=========================================
* Support for Linux 
* Support for parallel features (tested on O2K platform only)
* Most of the functions from the H5R, H5P, H5T, H5E and H5I interfaces were 
  implemented. See Reference Manual for complete list. The new functions  
  include support for object and dataset region references, and for 
  compound datatypes.
* This prototype supports more predefined types. See list below in 
  the "About the Fortran APIs" section.
* This prototype supports T3E and T3E with mpt 1.3. One has to modify
  H5Dff.f90, H5Aff.f90, H5Pff.f90 to comment lines with the module procedures for
  double precision datatypes. See source code.

Supported platforms
===================
The FORTRAN90 APIs provided here are known to work with the
following platforms and compilers:

     *  SunOS 5.6  with  WorkshopCompilers 4.2 Fortran 90 1.2
     *  SunOS 5.7  with  WorkshopCompilers 5.0 Fortran 90 2.0 
     *  OSF1 V4.0  with  Digital Fortran 90 4.1 
     *  Linux RedHat 6.1, Kernel 2.2.12 with PGF90
     *  T3E with Cray Fortran: Version 3.4.0.0
            with mpt 1.3

Compilation
===========

1. Install HDF5 Release 1.2.2 on your system
   (ftp://ftp.ncsa.uiuc.edu/HDF/HDF5/current).  If you are using a
   binary distribution provided by the HDF group, make sure that a GZIP 
   library is installed on your system. If you do not have a GZIP library,
   you may copy it from the HDF FTP server.

2. In the src directory copy H5fortran_types.f90_<system> to 
   H5fortran_types.f90, where <system> is one of the following:

     solaris
     digunix
     linux

   Example: On Digital Unix systems use the following command
            cp H5fortran_types.f90_digunix H5fortran_types.f90

3. Edit Makefile_<system >in the src/, test/ and examples/ directories
   to specify the locations of the HDF5 C Library, the GZIP Library, and the 
   corresponding include files on your system.

4. In the src directory, run make to create the HDF5 FORTRAN90 library 
   hdf5_fortran.a
             make -f Makefile_<system>
             
   Example: On Solaris run
            make -f Makefile_solaris

   The Fortran library hdf5_fortran.a will be created.

5. In the test directory, build tests by running  
            make -f Makefile_<system>
   This command will build fortranlib_test, fflush1 and fflush2 executables.
   Run those executables to make sure that the library works on your system.

6. In the examples directory, run
            make -f Makefile_<system>
   to build the following examples:
   
   fileexample       - creates an HDF5 file
   dsetexample       - creates an empty dataset of integers
   rwdsetexample     - writes and reads to the dataset created by dsetexample
   groupexample      - creates a group in the file
   grpsexample       - creates groups using absolute and relative names
   grpdsetexample    - creates datasets in the groups
   hyperslabexample  - writes and reads a hyperslab
   selectele         - writes element selections
   attrexample       - creates and writes a dataset attribute
   compound          - creates, writes and reads one dim array of structures
   mountexample      - shows how to use mounting files to access a dataset
   refobjexample     - creates and stores references to the objects
   refregexample     - creates and stores references to the dataset regions

   The script run_example.sh runs the examples in the appropriate order. 

   Use the HDF5 utility, h5dump, to see the content of the created HDF5 files.

7. Install the HDF5 Reference Manual (in HTML format).  The manual
   can be found in the Unix tar file H5_F90.R1.2.2.RefMan.tar
   on the ftp server and is served over the Web from
   http://hdf.ncsa.uiuc.edu/HDF5/doc/ (select the "HDF5 Fortran90 Docs" 
   link at the bottom of the left-hand column).


8. Send bug reports and comments to hdfhelp@ncsa.uiuc.edu

User's Guide Notes
+++++++++++++++++++

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.f.  Corresponding C
stubs are in the H5*f.c files.  For example, the Fortran File APIs are in 
the file H5Fff.f 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.  

Users must use constant names in their programs instead of the numerical 
values, as the numerical values are subject to change without notice. 

About the Fortran APIs 
=======================

*  The Fortran APIs come in the form of Fortran subroutines.

*  Each Fortran subroutine name is derived from the corresponding C function
   name by adding "_f" to the name.  For example, the name of the C function 
   to create an HDF5 file is H5Fcreate;  the corresponding Fortran subroutine 
   is h5fcreate_f. 

*  A description of each Fortran subroutine and its parameters can be found 
   following the description of the corresponding C function in the 
   Reference Manual provided with this release.  The manual can be found in 
   the Unix tar file H5_F90.R1.2.2.tar in this directory and
   is served over the Web from http://hdf.ncsa.uiuc.edu/HDF5/doc/ (select 
   the "HDF5 Fortran90 Docs" link at the bottom of the left-hand column).

*  The parameter list for each Fortran subroutine has two more parameters
   than the corresponding C function.  These additional parameters hold 
   the return value and an error code.  The order of the Fortran subroutine 
   parameters may differ from the order of the C function parameters. 
   The Fortran subroutine parameters are listed in the following order: 
      -- required input parameters,
      -- output parameters, including return value and error code, and 
      -- optional input parameters.
   For example, the C function to create a dataset has the following 
   prototype:

       hid_t H5Dcreate2(hid_it loc_id, char *name, hid_t type_id, 
             hid_t space_id, hid_t link_creation_prp, hid_t dset_creation_prp,
             hid_t dset_access_prop);
   
   The corresponding Fortran subroutine has the following form:
   
       SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, 
             hdferr, creation_prp)
  
   The first four parameters of the Fortran subroutine correspond to the 
   C function parameters.  The fifth parameter dset_id is an output 
   parameter and contains a valid dataset identifier if the value of the 
   sixth output parameter hdferr indicates successful completion. 
   (Error code descriptions are provided with the subroutine descriptions 
   in the Reference Manual.)  The seventh input parameter creation_prp 
   is optional, and may be omitted when the default creation property 
   list is used.
   (XXX: Update this! - QAK)

*  Parameters to the Fortran subroutines have one of the following 
   predefined datatypes (see the file H5fortran_types.f90 for KIND 
   definitions):
   
        INTEGER(HID_T)      compares with hid_t type in HDF5 C APIs
        INTEGER(HSIZE_T)    compares with hsize_t in HDF5 C APIs
        INTEGER(HSSIZE_T)   compares with hssize_t in HDF5 C APIs
        INTEGER(SIZE_T)     compares with the C size_t type
   These integer types usually correspond to 4 or 8 byte integers, 
   depending on the FORTRAN90 compiler and corresponding HDF5 
   C library definitions.
   
   The H5R module defines two types: 
        TYPE(HOBJ_REF_T_F)  compares to the hobj_ref_t in HDF5 C API
        TYPE(HDSET_REG_REF_T_F) compares to hdset_reg_ref_t in HDF5 C API
   These types are represented by character arrays now. 
   The internal representation can be changed in the future.

*  Each Fortran application must call the h5init_types subroutine to 
   initialize the Fortran predefined datatypes before calling the HDF5 Fortran 
   subroutines.  The application must call the h5close_types subroutine 
   after all calls to the HDF5 Fortran Library. 

*  The following predefined types are implemented in this prototype: 

                                H5T_NATIVE_INTEGER
                                H5T_NATIVE_REAL
                                H5T_NATIVE_DOUBLE
                                H5T_NATIVE_CHARACTER
                                H5T_STD_REF_OBJ
                                H5T_STD_REF_DSETREG
                                H5T_IEEE_F32BE
                                H5T_IEEE_F32LE
                                H5T_IEEE_F64BE
                                H5T_IEEE_F64LE
                                H5T_STD_I8BE
                                H5T_STD_I8LE
                                H5T_STD_I16BE
                                H5T_STD_I16LE
                                H5T_STD_I32BE
                                H5T_STD_I32LE
                                H5T_STD_I64BE
                                H5T_STD_I64LE
                                H5T_STD_U8BE
                                H5T_STD_U8LE
                                H5T_STD_U16BE
                                H5T_STD_U16LE
                                H5T_STD_U32BE
                                H5T_STD_U32LE
                                H5T_STD_U64BE
                                H5T_STD_U64LE
                                
    
*  When a C application reads data stored from a Fortran program, the data 
   will appear to be transposed due to the difference in the C - Fortran 
   storage order.  For example, if Fortran writes a 4x6 two-dimensional dataset 
   to the file, a C program will read it as a 6x4 two-dimensional dataset into 
   memory.  The HDF5 C utilities h5dump and h5ls display transposed data, if
   data is written from a Fortran program.
 
*  Fortran indices are 1 based.

*  Compound datatype datasets can be written or read by atomic fields only.

Not all of the APIs provided with this prototype have been fully tested.