diff options
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/H5Eff.f90 | 255 | ||||
-rw-r--r-- | fortran/src/H5fortran_flags.f90 | 26 | ||||
-rw-r--r-- | fortran/src/Makefile.am | 5 | ||||
-rw-r--r-- | fortran/src/Makefile.in | 26 |
4 files changed, 145 insertions, 167 deletions
diff --git a/fortran/src/H5Eff.f90 b/fortran/src/H5Eff.f90 index 5489a07..c7870fe 100644 --- a/fortran/src/H5Eff.f90 +++ b/fortran/src/H5Eff.f90 @@ -1,4 +1,13 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +!****h* fortran/src/H5Eff.f90 +! +! NAME +! H5E +! +! FUNCTION +! This file contains Fortran interfaces for H5E functions. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * ! All rights reserved. * @@ -11,16 +20,27 @@ ! is linked from the top-level documents page. It can also be found at * ! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * ! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! -! This file contains FORTRAN90 interfaces for H5E functions +! NOTES +! *** IMPORTANT *** +! If you add a new H5E function you must add the function name to the +! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory. +! This is needed for Windows based operating systems. ! - MODULE H5E +!***** - USE H5GLOBAL - - CONTAINS +MODULE H5E + + USE H5GLOBAL + + !Turn on automatic printing of errors + INTEGER, PARAMETER :: PRINTON = 1 + + !Turn off automatic printing of errors + INTEGER, PARAMETER :: PRINTOFF = 0 + +CONTAINS !---------------------------------------------------------------------- ! Name: h5eclear_f @@ -47,23 +67,23 @@ ! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5eclear_f(hdferr) - IMPLICIT NONE - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5eclear_f(hdferr) + IMPLICIT NONE + INTEGER, INTENT(OUT) :: hdferr ! Error code ! INTEGER, EXTERNAL :: h5eclear_c ! MS FORTRAN needs explicit interface for C functions called here. ! - INTERFACE - INTEGER FUNCTION h5eclear_c() - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5ECLEAR_C'::h5eclear_c - !DEC$ ENDIF - END FUNCTION h5eclear_c - END INTERFACE - hdferr = h5eclear_c() - END SUBROUTINE h5eclear_f + INTERFACE + INTEGER FUNCTION h5eclear_c() + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5ECLEAR_C'::h5eclear_c + !DEC$ ENDIF + END FUNCTION h5eclear_c + END INTERFACE + hdferr = h5eclear_c() + END SUBROUTINE h5eclear_f !---------------------------------------------------------------------- ! Name: h5h5eprint_f @@ -89,42 +109,38 @@ ! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5eprint_f(hdferr, name) - CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name - INTEGER, INTENT(OUT) :: hdferr ! Error code -! INTEGER, EXTERNAL :: h5eprint_c1, h5eprint_c2 - INTEGER :: namelen + SUBROUTINE h5eprint_f(hdferr, name) + CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: namelen -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5eprint_c1(name, namelen) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C1'::h5eprint_c1 - !DEC$ ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: namelen - CHARACTER(LEN=*),INTENT(IN) :: name - END FUNCTION h5eprint_c1 - END INTERFACE -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5eprint_c2() - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C2'::h5eprint_c2 - !DEC$ ENDIF - END FUNCTION h5eprint_c2 - END INTERFACE - namelen = LEN(NAME) - if (present(name)) then - hdferr = h5eprint_c1(name, namelen) - else - hdferr = h5eprint_c2() - endif - END SUBROUTINE h5eprint_f + INTERFACE + INTEGER FUNCTION h5eprint_c1(name, namelen) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C1'::h5eprint_c1 + !DEC$ ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: namelen + CHARACTER(LEN=*),INTENT(IN) :: name + END FUNCTION h5eprint_c1 + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5eprint_c2() + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C2'::h5eprint_c2 + !DEC$ ENDIF + END FUNCTION h5eprint_c2 + END INTERFACE + namelen = LEN(NAME) + IF (PRESENT(name)) THEN + hdferr = h5eprint_c1(name, namelen) + ELSE + hdferr = h5eprint_c2() + ENDIF + END SUBROUTINE h5eprint_f !---------------------------------------------------------------------- ! Name: h5eget_major_f @@ -152,31 +168,28 @@ ! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr) - INTEGER, INTENT(IN) :: error_no !Major error number - CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing - ! the error. - INTEGER(SIZE_T), INTENT(IN) :: namelen !Anticipated number of characters in name. - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr) + INTEGER, INTENT(IN) :: error_no ! Major error number + CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing + ! the error. + INTEGER(SIZE_T), INTENT(IN) :: namelen !Anticipated number of characters in name. + INTEGER, INTENT(OUT) :: hdferr ! Error code -! INTEGER, EXTERNAL :: h5eget_major_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5EGET_MAJOR_C'::h5eget_major_c - !DEC$ ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: error_no - CHARACTER(LEN=*) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - END FUNCTION h5eget_major_c - END INTERFACE - - hdferr = h5eget_major_c(error_no, name, namelen) - END SUBROUTINE h5eget_major_f + INTERFACE + INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5EGET_MAJOR_C'::h5eget_major_c + !DEC$ ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: error_no + CHARACTER(LEN=*) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + END FUNCTION h5eget_major_c + END INTERFACE + + hdferr = h5eget_major_c(error_no, name, namelen) + END SUBROUTINE h5eget_major_f !---------------------------------------------------------------------- ! Name: h5eget_minor_f @@ -206,29 +219,26 @@ ! Comment: !---------------------------------------------------------------------- - SUBROUTINE h5eget_minor_f(error_no, name, hdferr) - INTEGER, INTENT(IN) :: error_no !Major error number - CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing - ! the error - INTEGER, INTENT(OUT) :: hdferr ! Error code + SUBROUTINE h5eget_minor_f(error_no, name, hdferr) + INTEGER, INTENT(IN) :: error_no !Major error number + CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing + ! the error + INTEGER, INTENT(OUT) :: hdferr ! Error code -! INTEGER, EXTERNAL :: h5eget_minor_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5eget_minor_c(error_no, name) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5EGET_MINOR_C'::h5eget_minor_c - !DEC$ ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: error_no - CHARACTER(LEN=*) :: name - END FUNCTION h5eget_minor_c - END INTERFACE + INTERFACE + INTEGER FUNCTION h5eget_minor_c(error_no, name) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5EGET_MINOR_C'::h5eget_minor_c + !DEC$ ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: error_no + CHARACTER(LEN=*) :: name + END FUNCTION h5eget_minor_c + END INTERFACE - hdferr = h5eget_minor_c(error_no, name) - END SUBROUTINE h5eget_minor_f + hdferr = h5eget_minor_c(error_no, name) + END SUBROUTINE h5eget_minor_f !---------------------------------------------------------------------- ! Name: h5eset_auto_f ! @@ -258,29 +268,26 @@ !---------------------------------------------------------------------- - SUBROUTINE h5eset_auto_f(printflag, hdferr) - INTEGER, INTENT(IN) :: printflag !flag to turn automatic error - !printing on or off - !possible values are: - !printon (1) - !printoff(0) - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5eset_auto_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5eset_auto_c(printflag) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5ESET_AUTO_C'::h5eset_auto_c - !DEC$ ENDIF - INTEGER :: printflag - END FUNCTION h5eset_auto_c - END INTERFACE + SUBROUTINE h5eset_auto_f(printflag, hdferr) + INTEGER, INTENT(IN) :: printflag !flag to turn automatic error + !printing on or off + !possible values are: + !printon (1) + !printoff(0) + INTEGER, INTENT(OUT) :: hdferr ! Error code - hdferr = h5eset_auto_c(printflag) - END SUBROUTINE h5eset_auto_f + INTERFACE + INTEGER FUNCTION h5eset_auto_c(printflag) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !DEC$ ATTRIBUTES C,reference,decorate,alias:'H5ESET_AUTO_C'::h5eset_auto_c + !DEC$ ENDIF + INTEGER :: printflag + END FUNCTION h5eset_auto_c + END INTERFACE - END MODULE H5E + hdferr = h5eset_auto_c(printflag) + END SUBROUTINE h5eset_auto_f + +END MODULE H5E diff --git a/fortran/src/H5fortran_flags.f90 b/fortran/src/H5fortran_flags.f90 deleted file mode 100644 index 80122cd..0000000 --- a/fortran/src/H5fortran_flags.f90 +++ /dev/null @@ -1,26 +0,0 @@ -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! - MODULE H5FORTRAN_FLAGS -! -! H5E interface related fortran flags: -! - !Turn on automatic printing of errors - INTEGER, PARAMETER :: PRINTON = 1 - - !Turn off automatic printing of errors - INTEGER, PARAMETER :: PRINTOFF = 0 - - END MODULE H5FORTRAN_FLAGS diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 6da0883..c147bf5 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -57,7 +57,7 @@ else endif # Source files for the library. -libhdf5_fortran_la_SOURCES=H5fortran_flags.f90 H5f90global.f90 \ +libhdf5_fortran_la_SOURCES= H5f90global.f90 \ H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ H5Tff.f90 H5Zff.f90 \ @@ -174,8 +174,7 @@ FORTRAN_API=yes # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5fortran_flags.lo: $(srcdir)/H5fortran_flags.f90 -H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_flags.lo H5fortran_types.lo +H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_types.lo H5fortran_types.lo: H5fortran_types.f90 H5fortran_detect.lo: H5fortran_detect.f90 H5test_kind.lo: $(srcdir)/H5test_kind.f90 diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 8c4d5ab..df73b98 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -76,23 +76,22 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(settingsdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_fortran_la_LIBADD = -am__libhdf5_fortran_la_SOURCES_DIST = H5fortran_flags.f90 \ - H5f90global.f90 H5fortran_types.f90 H5_ff.f90 H5Aff.f90 \ - H5Dff.f90 H5Eff.f90 H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 \ - H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 H5Tff.f90 H5Zff.f90 \ +am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.f90 \ + H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ + H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 \ + H5Rff.f90 H5Sff.f90 H5Tff.f90 H5Zff.f90 \ H5_DBLE_Interface$(F_DBLE).f90 H5f90kit.c H5_f.c H5Af.c H5Df.c \ H5Ef.c H5Ff.c H5Gf.c H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c \ H5Tf.c H5Zf.c HDF5.f90 H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 @BUILD_PARALLEL_CONDITIONAL_FALSE@am__objects_1 = HDF5.lo @BUILD_PARALLEL_CONDITIONAL_TRUE@am__objects_1 = H5FDmpiof.lo \ @BUILD_PARALLEL_CONDITIONAL_TRUE@ HDF5mpio.lo H5FDmpioff.lo -am_libhdf5_fortran_la_OBJECTS = H5fortran_flags.lo H5f90global.lo \ - H5fortran_types.lo H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo \ - H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo \ - H5Sff.lo H5Tff.lo H5Zff.lo H5_DBLE_Interface$(F_DBLE).lo \ - H5f90kit.lo H5_f.lo H5Af.lo H5Df.lo H5Ef.lo H5Ff.lo H5Gf.lo \ - H5If.lo H5Lf.lo H5Of.lo H5Pf.lo H5Rf.lo H5Sf.lo H5Tf.lo \ - H5Zf.lo $(am__objects_1) +am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.lo \ + H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \ + H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo \ + H5_DBLE_Interface$(F_DBLE).lo H5f90kit.lo H5_f.lo H5Af.lo \ + H5Df.lo H5Ef.lo H5Ff.lo H5Gf.lo H5If.lo H5Lf.lo H5Of.lo \ + H5Pf.lo H5Rf.lo H5Sf.lo H5Tf.lo H5Zf.lo $(am__objects_1) libhdf5_fortran_la_OBJECTS = $(am_libhdf5_fortran_la_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) am_H5fortran_detect_OBJECTS = H5fortran_detect.$(OBJEXT) @@ -413,7 +412,7 @@ lib_LTLIBRARIES = libhdf5_fortran.la @FORTRAN_DEFAULT_REALisDBLE_F_TRUE@F_DBLE = Exclude # Source files for the library. -libhdf5_fortran_la_SOURCES = H5fortran_flags.f90 H5f90global.f90 \ +libhdf5_fortran_la_SOURCES = H5f90global.f90 \ H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ H5Tff.f90 H5Zff.f90 \ @@ -902,8 +901,7 @@ H5fortran_detect.f90: H5test_kind$(EXEEXT) # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5fortran_flags.lo: $(srcdir)/H5fortran_flags.f90 -H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_flags.lo H5fortran_types.lo +H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_types.lo H5fortran_types.lo: H5fortran_types.f90 H5fortran_detect.lo: H5fortran_detect.f90 H5test_kind.lo: $(srcdir)/H5test_kind.f90 |