summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/H5Aff.F9061
-rw-r--r--fortran/src/H5Dff.F9043
-rw-r--r--fortran/src/H5config_f.inc.in4
-rw-r--r--fortran/src/HDF5.F902
-rw-r--r--fortran/src/Makefile.in44
5 files changed, 97 insertions, 57 deletions
diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90
index ccafeb7..007eff0 100644
--- a/fortran/src/H5Aff.F90
+++ b/fortran/src/H5Aff.F90
@@ -66,6 +66,7 @@
MODULE H5A
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char, c_int, C_NULL_CHAR
USE H5GLOBAL
INTERFACE h5awrite_f
@@ -190,8 +191,6 @@ CONTAINS
! SOURCE
SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, &
hdferr, acpl_id, aapl_id )
- USE H5GLOBAL
- USE ISO_C_BINDING
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name
@@ -210,7 +209,8 @@ CONTAINS
INTERFACE
INTEGER(HID_T) FUNCTION H5Acreate2(loc_id, name, type_id, &
space_id, acpl_id_default, aapl_id_default) BIND(C,NAME='H5Acreate2')
- IMPORT :: C_CHAR, HID_T
+ IMPORT :: C_CHAR
+ IMPORT :: HID_T
INTEGER(HID_T), INTENT(IN), VALUE :: loc_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
INTEGER(HID_T), INTENT(IN), VALUE :: type_id
@@ -262,7 +262,6 @@ CONTAINS
!
! SOURCE
SUBROUTINE H5Aopen_name_f(obj_id, name, attr_id, hdferr)
- USE ISO_C_BINDING
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name
@@ -273,8 +272,8 @@ CONTAINS
INTERFACE
INTEGER(HID_T) FUNCTION H5Aopen_name(obj_id, name) BIND(C,NAME='H5Aopen_name')
- USE H5GLOBAL
IMPORT :: C_CHAR
+ IMPORT :: HID_T
INTEGER(HID_T), INTENT(IN), VALUE :: obj_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
END FUNCTION H5Aopen_name
@@ -315,7 +314,6 @@ CONTAINS
!
! SOURCE
SUBROUTINE H5Aopen_idx_f(obj_id, index, attr_id, hdferr)
- USE ISO_C_BINDING
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier
INTEGER, INTENT(IN) :: index ! Attribute index
@@ -325,8 +323,8 @@ CONTAINS
INTERFACE
INTEGER(HID_T) FUNCTION H5Aopen_idx(obj_id, index) BIND(C,NAME='H5Aopen_idx')
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T
+ IMPORT :: C_INT
INTEGER(HID_T), INTENT(IN) :: obj_id
INTEGER(C_INT), INTENT(IN) :: index
END FUNCTION H5Aopen_idx
@@ -458,7 +456,6 @@ CONTAINS
!
! SOURCE
SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr)
- USE ISO_C_BINDING
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: attr_id
INTEGER(SIZE_T), INTENT(IN) :: size
@@ -781,7 +778,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Aclose(attr_id) BIND(C, NAME='H5Aclose')
- USE H5GLOBAL
+ IMPORT :: HID_T
INTEGER(HID_T), INTENT(IN), VALUE :: attr_id
END FUNCTION H5Aclose
END INTERFACE
@@ -817,8 +814,7 @@ CONTAINS
INTERFACE
INTEGER(HSIZE_T) FUNCTION H5Aget_storage_size(attr_id) BIND(C,NAME='H5Aget_storage_size')
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, HSIZE_T
INTEGER(HID_T), INTENT(IN), VALUE :: attr_id
END FUNCTION H5Aget_storage_size
END INTERFACE
@@ -859,7 +855,7 @@ CONTAINS
!*****
INTERFACE
INTEGER(HID_T) FUNCTION H5Aget_create_plist(attr_id) BIND(C,NAME='H5Aget_create_plist')
- USE H5GLOBAL
+ IMPORT :: HID_T
INTEGER(HID_T), INTENT(IN), VALUE :: attr_id
END FUNCTION H5Aget_create_plist
END INTERFACE
@@ -915,8 +911,7 @@ CONTAINS
INTEGER FUNCTION H5Arename_by_name_c(loc_id, obj_name, obj_namelen, &
old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, &
lapl_id_default)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_BY_NAME_C'::H5Arename_by_name_c
!DEC$ENDIF
@@ -987,8 +982,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_C'::H5Aopen_c
!DEC$ENDIF
@@ -1073,8 +1067,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T, HSIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_IDX_C'::H5Adelete_by_idx_c
!DEC$ENDIF
@@ -1136,8 +1129,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_NAME_C'::H5Adelete_by_name_c
!DEC$ENDIF
@@ -1217,8 +1209,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, &
aapl_id_default, lapl_id_default, attr_id)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T, HSIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_IDX_C'::H5Aopen_by_idx_c
!DEC$ENDIF
@@ -1286,8 +1277,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, HSIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_C'::H5Aget_info_c
!DEC$ENDIF
@@ -1372,8 +1362,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, &
corder_valid, corder, cset, data_size)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T, HSIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_IDX_C'::H5Aget_info_by_idx_c
!DEC$ENDIF
@@ -1458,8 +1447,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, &
corder_valid, corder, cset, data_size)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T, HSIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_NAME_C'::H5Aget_info_by_name_c
!DEC$ENDIF
@@ -1545,8 +1533,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, &
type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_BY_NAME_C'::H5Acreate_by_name_c
!DEC$ENDIF
@@ -1616,8 +1603,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_C'::H5Aexists_c
!DEC$ENDIF
@@ -1682,8 +1668,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::H5Aexists_by_name_c
!DEC$ENDIF
@@ -1757,8 +1742,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, &
aapl_id_default, lapl_id_default, attr_id)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::H5Aopen_by_name_c
!DEC$ENDIF
@@ -1828,8 +1812,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION H5Arename_c(loc_id, &
old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen)
- USE ISO_C_BINDING
- USE H5GLOBAL
+ IMPORT :: HID_T, SIZE_T
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_C'::H5Arename_c
!DEC$ENDIF
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90
index b70c091..3a0d149 100644
--- a/fortran/src/H5Dff.F90
+++ b/fortran/src/H5Dff.F90
@@ -293,8 +293,6 @@ CONTAINS
INTEGER :: namelen ! Name length
-! MS FORTRAN needs explicit interface for C functions called here.
-!
INTERFACE
INTEGER FUNCTION h5dcreate_c(loc_id, name, namelen, type_id, &
space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) &
@@ -1101,6 +1099,47 @@ CONTAINS
END SUBROUTINE h5dread_vl_string
!
+!****s* H5D/h5dget_offset_f
+!
+! NAME
+! h5dget_offset_f
+!
+! PURPOSE
+! Returns dataset address in file.
+!
+! INPUTS
+! dataset_id - Dataset identifier.
+! OUTPUTS
+! offset - The offset in bytes.
+! hdferr - Returns 0 if successful and -1 if fails.
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! April 16, 2015
+!
+! SOURCE
+ SUBROUTINE h5dget_offset_f(dset_id, offset, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: dset_id
+ INTEGER(HADDR_T), INTENT(OUT) :: offset
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+ INTERFACE
+ INTEGER(HADDR_T) FUNCTION h5dget_offset(dset_id) BIND(C,NAME='H5Dget_offset')
+ IMPORT :: HID_T, HADDR_T
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: dset_id
+ END FUNCTION h5dget_offset
+ END INTERFACE
+
+ offset = h5dget_offset(dset_id)
+
+ hdferr = 0
+ IF(offset .LT. 0) hdferr = -1
+
+ END SUBROUTINE h5dget_offset_f
+
+!
!****s* H5D/h5dget_space_f
!
! NAME
diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in
new file mode 100644
index 0000000..aec8b08
--- /dev/null
+++ b/fortran/src/H5config_f.inc.in
@@ -0,0 +1,4 @@
+! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure
+
+! Define if we have parallel support
+#undef HAVE_PARALLEL
diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90
index a2c8d1c..ac28ed3 100644
--- a/fortran/src/HDF5.F90
+++ b/fortran/src/HDF5.F90
@@ -27,6 +27,8 @@
!
!*****
+#include "H5config_f.inc"
+
MODULE HDF5
USE H5GLOBAL
USE H5F
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 91f5e72..1608926 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -99,9 +99,9 @@ host_triplet = @host@
DIST_COMMON = $(top_srcdir)/config/commence.am \
$(top_srcdir)/config/lt_vers.am \
$(top_srcdir)/config/conclude.am $(srcdir)/Makefile.in \
- $(srcdir)/Makefile.am $(top_srcdir)/bin/mkinstalldirs \
- $(srcdir)/h5fc.in $(top_srcdir)/bin/depcomp \
- $(top_srcdir)/bin/test-driver README
+ $(srcdir)/Makefile.am $(srcdir)/H5config_f.inc.in \
+ $(top_srcdir)/bin/mkinstalldirs $(srcdir)/h5fc.in \
+ $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver README
# Some Fortran compilers can't build shared libraries, so sometimes we
# want to build a shared C library and a static Fortran library. If so,
@@ -117,7 +117,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/src/H5config.h
+CONFIG_HEADER = $(top_builddir)/src/H5config.h H5config_f.inc
CONFIG_CLEAN_FILES = h5fc
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -251,7 +251,8 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+ $(LISP)H5config_f.inc.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
@@ -812,7 +813,7 @@ TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
-all: $(BUILT_SOURCES)
+all: $(BUILT_SOURCES) H5config_f.inc
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
@@ -848,6 +849,17 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+
+H5config_f.inc: stamp-h2
+ @test -f $@ || rm -f stamp-h2
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2
+
+stamp-h2: $(srcdir)/H5config_f.inc.in $(top_builddir)/config.status
+ @rm -f stamp-h2
+ cd $(top_builddir) && $(SHELL) ./config.status fortran/src/H5config_f.inc
+
+distclean-hdr:
+ -rm -f H5config_f.inc stamp-h2
h5fc: $(top_builddir)/config.status $(srcdir)/h5fc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
@@ -1201,7 +1213,7 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) H5config_f.inc all-local
installdirs:
for dir in "$(DESTDIR)$(libdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@@ -1252,7 +1264,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-local distclean-tags
+ distclean-hdr distclean-local distclean-tags
dvi: dvi-am
@@ -1321,14 +1333,14 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local
check-am clean clean-generic clean-libLTLIBRARIES \
clean-libtool clean-local clean-noinstPROGRAMS cscopelist-am \
ctags ctags-am distclean distclean-compile distclean-generic \
- distclean-libtool distclean-local distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-data-local install-dvi \
- install-dvi-am install-exec install-exec-am install-exec-local \
- install-html install-html-am install-info install-info-am \
- install-libLTLIBRARIES install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+ distclean-hdr distclean-libtool distclean-local distclean-tags \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-exec-local install-html install-html-am install-info \
+ install-info-am install-libLTLIBRARIES install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic maintainer-clean-local mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \