summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-04-19 15:23:01 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-04-19 15:23:01 (GMT)
commit14d8e1c2b5ecaf2e298984f269094dd5f2bd735f (patch)
treecc250461294a2c9118b10a95d0459d7314fa5e50 /fortran
parent6ee0e05fb94445551840fcb80b9b1c254c736799 (diff)
downloadhdf5-14d8e1c2b5ecaf2e298984f269094dd5f2bd735f.zip
hdf5-14d8e1c2b5ecaf2e298984f269094dd5f2bd735f.tar.gz
hdf5-14d8e1c2b5ecaf2e298984f269094dd5f2bd735f.tar.bz2
[svn-r23600] Bring revisions #23085 - #23341 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'fortran')
-rw-r--r--fortran/CMakeLists.txt2
-rw-r--r--fortran/Makefile.in2
-rw-r--r--fortran/examples/CMakeLists.txt18
-rw-r--r--fortran/examples/Makefile.am40
-rw-r--r--fortran/examples/Makefile.in42
-rw-r--r--fortran/examples/attrexample.f90117
-rw-r--r--fortran/examples/dsetexample.f9085
-rw-r--r--fortran/examples/grpdsetexample.f90156
-rw-r--r--fortran/examples/grpsexample.f9083
-rw-r--r--fortran/examples/h5_cmprss.f90131
-rw-r--r--fortran/examples/h5_crtatt.f90106
-rw-r--r--fortran/examples/h5_crtdat.f9086
-rw-r--r--fortran/examples/h5_crtgrp.f90 (renamed from fortran/examples/groupexample.f90)68
-rw-r--r--fortran/examples/h5_crtgrpar.f9083
-rw-r--r--fortran/examples/h5_crtgrpd.f90155
-rw-r--r--fortran/examples/h5_extend.f90233
-rw-r--r--fortran/examples/h5_rdwt.f9096
-rw-r--r--fortran/examples/h5_subset.f90184
-rw-r--r--fortran/examples/run-fortran-ex.sh.in32
-rw-r--r--fortran/examples/rwdsetexample.f9096
-rw-r--r--fortran/src/CMakeLists.txt3
-rw-r--r--fortran/src/H5Aff.f902
-rw-r--r--fortran/src/H5Aff_F03.f902
-rw-r--r--fortran/src/H5Aff_F90.f902
-rw-r--r--fortran/src/H5Dff.f902
-rw-r--r--fortran/src/H5Dff_F03.f902
-rw-r--r--fortran/src/H5Dff_F90.f902
-rw-r--r--fortran/src/H5Eff.f902
-rw-r--r--fortran/src/H5Eff_F03.f902
-rw-r--r--fortran/src/H5Eff_F90.f902
-rw-r--r--fortran/src/H5FDmpioff.f902
-rw-r--r--fortran/src/H5Ff.c34
-rw-r--r--fortran/src/H5Fff.f902
-rw-r--r--fortran/src/H5Fff_F03.f90104
-rw-r--r--fortran/src/H5Fff_F90.f90 (renamed from fortran/examples/fileexample.f90)52
-rw-r--r--fortran/src/H5Gff.f902
-rw-r--r--fortran/src/H5Iff.f902
-rw-r--r--fortran/src/H5Lf.c2
-rw-r--r--fortran/src/H5Lff.f902
-rw-r--r--fortran/src/H5Lff_F03.f902
-rw-r--r--fortran/src/H5Lff_F90.f902
-rw-r--r--fortran/src/H5Off.f902
-rw-r--r--fortran/src/H5Off_F03.f902
-rw-r--r--fortran/src/H5Off_F90.f902
-rw-r--r--fortran/src/H5Pf.c38
-rw-r--r--fortran/src/H5Pff.f9023
-rw-r--r--fortran/src/H5Pff_F03.f902
-rw-r--r--fortran/src/H5Pff_F90.f902
-rw-r--r--fortran/src/H5Rff.f902
-rw-r--r--fortran/src/H5Rff_F03.f90114
-rw-r--r--fortran/src/H5Rff_F90.f9030
-rw-r--r--fortran/src/H5Sff.f902
-rw-r--r--fortran/src/H5Tff.f902
-rw-r--r--fortran/src/H5Tff_F03.f902
-rw-r--r--fortran/src/H5Tff_F90.f902
-rw-r--r--fortran/src/H5Zff.f902
-rw-r--r--fortran/src/H5_ff.f902
-rw-r--r--fortran/src/H5_ff_F03.f902
-rw-r--r--fortran/src/H5f90proto.h6
-rw-r--r--fortran/src/H5match_types.c13
-rw-r--r--fortran/src/H5test_kind_SIZEOF.f904
-rw-r--r--fortran/src/HDF5.f901
-rw-r--r--fortran/src/Makefile.am9
-rw-r--r--fortran/src/Makefile.in26
-rw-r--r--fortran/src/hdf5_fortrandll.def.in1
-rw-r--r--fortran/test/CMakeLists.txt3
-rw-r--r--fortran/test/Makefile.am2
-rw-r--r--fortran/test/Makefile.in9
-rw-r--r--fortran/test/fortranlib_test_F03.f9014
-rw-r--r--fortran/test/tH5F_F03.f90175
-rw-r--r--fortran/test/tH5P.f90842
-rw-r--r--fortran/test/tH5P_F03.f90141
-rw-r--r--fortran/test/tH5T_F03.f90385
-rw-r--r--fortran/testpar/CMakeLists.txt2
-rw-r--r--fortran/testpar/Makefile.in2
75 files changed, 2634 insertions, 1274 deletions
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt
index d18cdb4..9dbe8ca 100644
--- a/fortran/CMakeLists.txt
+++ b/fortran/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_F90 C CXX Fortran)
IF (H5_HAVE_PARALLEL)
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 806eb30..acab031 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -231,6 +231,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -282,7 +283,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 0825f81..0536183 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_F90_EXAMPLES C CXX Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
@@ -14,13 +14,15 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${
# Define Sources
#-----------------------------------------------------------------------------
SET (examples
- dsetexample
- fileexample
- rwdsetexample
- attrexample
- groupexample
- grpsexample
- grpdsetexample
+ h5_cmprss
+ h5_crtdat
+ h5_rdwt
+ h5_crtatt
+ h5_crtgrp
+ h5_crtgrpar
+ h5_crtgrpd
+ h5_extend
+ h5_subset
hyperslab
selectele
refobjexample
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index 310c4e2..e994d4e 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -32,15 +32,15 @@ endif
# We don't tell automake about these programs so that it doesn't try to
# compile them with the regular fortran compiler.
-EXAMPLE_PROG=dsetexample fileexample rwdsetexample attrexample groupexample \
- grpsexample grpdsetexample hyperslab selectele refobjexample \
- refregexample mountexample compound
+EXAMPLE_PROG=h5_crtdat h5_rdwt h5_crtatt h5_crtgrp \
+ h5_crtgrpar h5_crtgrpd h5_extend h5_subset h5_cmprss hyperslab selectele \
+ refobjexample refregexample mountexample compound
# List files to be installed here
-INSTALL_FILES=dsetexample.f90 fileexample.f90 rwdsetexample.f90 \
- attrexample.f90 groupexample.f90 grpsexample.f90 grpdsetexample.f90 \
- hyperslab.f90 selectele.f90 refobjexample.f90 \
- refregexample.f90 mountexample.f90 compound.f90 ph5example.f90
+INSTALL_FILES=h5_crtdat.f90 h5_rdwt.f90 \
+ h5_crtatt.f90 h5_crtgrp.f90 h5_crtgrpar.f90 h5_crtgrpd.f90 \
+ h5_extend.f90 h5_subset.f90 h5_cmprss.f90 hyperslab.f90 selectele.f90 refobjexample.f90 \
+ refregexample.f90 mountexample.f90 compound.f90 ph5example.f90
INSTALL_SCRIPT_FILES = run-fortran-ex.sh
@@ -57,12 +57,12 @@ TEST_SCRIPT=testh5fc.sh
FORTRAN_API=yes
# Some examples depend on files created by other examples.
-grpdsetexample.chkexe_: grpsexample.chkexe_
+h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_
refregexample.chkexe_: refobjexample.chkexe_
-# rwdsetexample and attrexample both modify the same file created by
-# dsetexample. Serialize them.
-rwdsetexample.chkexe_: dsetexample.chkexe_
-attrexample.chkexe_: rwdsetexample.chkexe_
+# h5_rdwt and h5_crtatt both modify the same file created by
+# h5_crtdat. Serialize them.
+h5_rdwt.chkexe_: h5_crtdat.chkexe_
+h5_crtatt.chkexe_: h5_rdwt.chkexe_
# Tell automake how to build examples using h5fc
# Additional dependencies for the examples are listed below
@@ -84,13 +84,15 @@ EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/fortran
# an inelegant way of solving the problem.
# All programs share the same build rule and a dependency on the main hdf5
# and fortran libraries above.
-dsetexample: dsetexample.f90
-fileexample: fileexample.f90
-rwdsetexample: rwdsetexample.f90
-attrexample: attrexample.f90
-groupexample: groupexample.f90
-grpsexample: grpsexample.f90
-grpdsetexample: grpdsetexample.f90
+h5_crtdat: h5_crtdat.f90
+h5_extend: h5_extend.f90
+h5_subset: h5_subset.f90
+h5_rdwt: h5_rdwt.f90
+h5_crtatt: h5_crtatt.f90
+h5_crtgrp: h5_crtgrp.f90
+h5_crtgrpar: h5_crtgrpar.f90
+h5_crtgrpd: h5_crtgrpd.f90
+h5_cmprss: h5_cmprss.f90
hyperslab: hyperslab.f90
selectele: selectele.f90
refobjexample: refobjexample.f90
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 21adf62..93a2af1 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -202,6 +202,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -253,7 +254,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -405,17 +405,17 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
# be run.
# We don't tell automake about these programs so that it doesn't try to
# compile them with the regular fortran compiler.
-EXAMPLE_PROG = dsetexample fileexample rwdsetexample attrexample \
- groupexample grpsexample grpdsetexample hyperslab selectele \
+EXAMPLE_PROG = h5_crtdat h5_rdwt h5_crtatt h5_crtgrp h5_crtgrpar \
+ h5_crtgrpd h5_extend h5_subset h5_cmprss hyperslab selectele \
refobjexample refregexample mountexample compound \
$(am__append_1)
# List files to be installed here
-INSTALL_FILES = dsetexample.f90 fileexample.f90 rwdsetexample.f90 \
- attrexample.f90 groupexample.f90 grpsexample.f90 \
- grpdsetexample.f90 hyperslab.f90 selectele.f90 \
- refobjexample.f90 refregexample.f90 mountexample.f90 \
- compound.f90 ph5example.f90 $(am__append_2)
+INSTALL_FILES = h5_crtdat.f90 h5_rdwt.f90 h5_crtatt.f90 h5_crtgrp.f90 \
+ h5_crtgrpar.f90 h5_crtgrpd.f90 h5_extend.f90 h5_subset.f90 \
+ h5_cmprss.f90 hyperslab.f90 selectele.f90 refobjexample.f90 \
+ refregexample.f90 mountexample.f90 compound.f90 ph5example.f90 \
+ $(am__append_2)
INSTALL_SCRIPT_FILES = run-fortran-ex.sh
TEST_SCRIPT = testh5fc.sh
@@ -668,12 +668,12 @@ help:
@$(top_srcdir)/bin/makehelp
# Some examples depend on files created by other examples.
-grpdsetexample.chkexe_: grpsexample.chkexe_
+h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_
refregexample.chkexe_: refobjexample.chkexe_
-# rwdsetexample and attrexample both modify the same file created by
-# dsetexample. Serialize them.
-rwdsetexample.chkexe_: dsetexample.chkexe_
-attrexample.chkexe_: rwdsetexample.chkexe_
+# h5_rdwt and h5_crtatt both modify the same file created by
+# h5_crtdat. Serialize them.
+h5_rdwt.chkexe_: h5_crtdat.chkexe_
+h5_crtatt.chkexe_: h5_rdwt.chkexe_
# Tell automake how to build examples using h5fc
# Additional dependencies for the examples are listed below
@@ -688,13 +688,15 @@ attrexample.chkexe_: rwdsetexample.chkexe_
# an inelegant way of solving the problem.
# All programs share the same build rule and a dependency on the main hdf5
# and fortran libraries above.
-dsetexample: dsetexample.f90
-fileexample: fileexample.f90
-rwdsetexample: rwdsetexample.f90
-attrexample: attrexample.f90
-groupexample: groupexample.f90
-grpsexample: grpsexample.f90
-grpdsetexample: grpdsetexample.f90
+h5_crtdat: h5_crtdat.f90
+h5_extend: h5_extend.f90
+h5_subset: h5_subset.f90
+h5_rdwt: h5_rdwt.f90
+h5_crtatt: h5_crtatt.f90
+h5_crtgrp: h5_crtgrp.f90
+h5_crtgrpar: h5_crtgrpar.f90
+h5_crtgrpd: h5_crtgrpd.f90
+h5_cmprss: h5_cmprss.f90
hyperslab: hyperslab.f90
selectele: selectele.f90
refobjexample: refobjexample.f90
diff --git a/fortran/examples/attrexample.f90 b/fortran/examples/attrexample.f90
deleted file mode 100644
index ffbeabe..0000000
--- a/fortran/examples/attrexample.f90
+++ /dev/null
@@ -1,117 +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. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-! This example shows how to create and write a dataset attribute.
-! It opens the existing file 'dset.h5', obtains the identifier of
-! the dataset "/dset", defines attribute's dataspace,
-! creates dataset attribute, writes the attribute, and then closes
-! the attribute's dataspace, attribute, dataset, and file.
-
- PROGRAM ATTREXAMPLE
-
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
-
- CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
- CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
- CHARACTER(LEN=9), PARAMETER :: aname = "attr_long" ! Attribute name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: dset_id ! Dataset identifier
- INTEGER(HID_T) :: attr_id ! Attribute identifier
- INTEGER(HID_T) :: aspace_id ! Attribute Dataspace identifier
- INTEGER(HID_T) :: atype_id ! Attribute Dataspace identifier
- INTEGER(HSIZE_T), DIMENSION(1) :: adims = (/2/) ! Attribute dimension
- INTEGER :: arank = 1 ! Attribure rank
- INTEGER(SIZE_T) :: attrlen ! Length of the attribute string
-
- CHARACTER(LEN=80), DIMENSION(2) :: attr_data ! Attribute data
-
- INTEGER :: error ! Error flag
- INTEGER(HSIZE_T), DIMENSION(1) :: data_dims
-
-
- !
- ! Initialize attribute's data
- !
- attr_data(1) = "Dataset character attribute"
- attr_data(2) = "Some other string here "
- attrlen = 80
- !
- ! Initialize FORTRAN interface.
- !
- CALL h5open_f(error)
-
- !
- ! Open an existing file.
- !
- CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
-
- !
- ! Open an existing dataset.
- !
- CALL h5dopen_f(file_id, dsetname, dset_id, error)
-
- !
- ! Create scalar data space for the attribute.
- !
- CALL h5screate_simple_f(arank, adims, aspace_id, error)
- !
- ! Create datatype for the attribute.
- !
- CALL h5tcopy_f(H5T_NATIVE_CHARACTER, atype_id, error)
- CALL h5tset_size_f(atype_id, attrlen, error)
-
- !
- ! Create dataset attribute.
- !
- CALL h5acreate_f(dset_id, aname, atype_id, aspace_id, &
- attr_id, error)
-
- !
- ! Write the attribute data.
- !
- data_dims(1) = 2
- CALL h5awrite_f(attr_id, atype_id, attr_data, data_dims, error)
-
- !
- ! Close the attribute.
- !
- CALL h5aclose_f(attr_id, error)
-
- !
- ! Terminate access to the data space.
- !
- CALL h5sclose_f(aspace_id, error)
-
- !
- ! End access to the dataset and release resources used by it.
- !
- CALL h5dclose_f(dset_id, error)
-
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
-
- !
- ! Close FORTRAN interface.
- !
- CALL h5close_f(error)
-
- END PROGRAM ATTREXAMPLE
-
diff --git a/fortran/examples/dsetexample.f90 b/fortran/examples/dsetexample.f90
deleted file mode 100644
index 209a516..0000000
--- a/fortran/examples/dsetexample.f90
+++ /dev/null
@@ -1,85 +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. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-!
-! The following example shows how to create an empty dataset.
-! It creates a file called 'dsetf.h5', defines the
-! dataset dataspace, creates a dataset which is a 4x6 integer array,
-! and then closes the dataspace, the dataset, and the file.
-!
-
- PROGRAM DSETEXAMPLE
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
-
- CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
- CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: dset_id ! Dataset identifier
- INTEGER(HID_T) :: dspace_id ! Dataspace identifier
-
-
- INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions
- INTEGER :: rank = 2 ! Dataset rank
-
- INTEGER :: error ! Error flag
-
- !
- ! Initialize FORTRAN interface.
- !
- CALL h5open_f(error)
-
- !
- ! Create a new file using default properties.
- !
- CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
-
- !
- ! Create the dataspace.
- !
- CALL h5screate_simple_f(rank, dims, dspace_id, error)
-
- !
- ! Create the dataset with default properties.
- !
- CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dspace_id, &
- dset_id, error)
-
- !
- ! End access to the dataset and release resources used by it.
- !
- CALL h5dclose_f(dset_id, error)
-
- !
- ! Terminate access to the data space.
- !
- CALL h5sclose_f(dspace_id, error)
-
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
-
- !
- ! Close FORTRAN interface.
- !
- CALL h5close_f(error)
-
- END PROGRAM DSETEXAMPLE
-
-
diff --git a/fortran/examples/grpdsetexample.f90 b/fortran/examples/grpdsetexample.f90
deleted file mode 100644
index 19fc660..0000000
--- a/fortran/examples/grpdsetexample.f90
+++ /dev/null
@@ -1,156 +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. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-!
-! This example shows how to create a dataset in a particular group.
-! It opens the file created in the previous example and creates two datasets.
-! Absolute and relative dataset names are used.
-!
-
-
- PROGRAM GRPDSETEXAMPLE
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
-
- CHARACTER(LEN=10), PARAMETER :: filename = "groupsf.h5" ! File name
- CHARACTER(LEN=15), PARAMETER :: groupname = "MyGroup/Group_A" ! Group name
- CHARACTER(LEN=13), PARAMETER :: dsetname1 = "MyGroup/dset1" ! Dataset name
- CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! dataset name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: group_id ! Group identifier
- INTEGER(HID_T) :: dataset_id ! Dataset identifier
- INTEGER(HID_T) :: dataspace_id ! Data space identifier
-
- INTEGER :: i, j
- INTEGER :: error ! Error flag
-
- INTEGER, DIMENSION(3,3) :: dset1_data ! Data arrays
- INTEGER, DIMENSION(2,10) :: dset2_data !
-
- INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/3,3/) ! Datasets dimensions
- INTEGER(HSIZE_T), DIMENSION(2) :: dims2 = (/2,10/)!
- INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
-
- INTEGER :: rank = 2 ! Datasets rank
-
- !
- !Initialize dset1_data array
- !
- do i = 1, 3
- do j = 1, 3
- dset1_data(i,j) = j;
- end do
- end do
-
-
- !
- !Initialize dset2_data array
- !
- do i = 1, 2
- do j = 1, 10
- dset2_data(i,j) = j;
- end do
- end do
-
- !
- ! Initialize FORTRAN interface.
- !
- CALL h5open_f(error)
-
- !
- ! Open an existing file.
- !
- CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
-
- !
- ! Create the data space for the first dataset.
- !
- CALL h5screate_simple_f(rank, dims1, dataspace_id, error)
-
- !
- ! Create a dataset in group "MyGroup" with default properties.
- !
- CALL h5dcreate_f(file_id, dsetname1, H5T_NATIVE_INTEGER, dataspace_id, &
- dataset_id, error)
-
- !
- ! Write the first dataset.
- !
- data_dims(1) = 3
- data_dims(2) = 3
- CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, dset1_data, data_dims, error)
-
- !
- ! Close the dataspace for the first dataset.
- !
- CALL h5sclose_f(dataspace_id, error)
-
- !
- ! Close the first dataset.
- !
- CALL h5dclose_f(dataset_id, error)
-
- !
- ! Open an existing group in the specified file.
- !
- CALL h5gopen_f(file_id, groupname, group_id, error)
-
- !
- !Create the data space for the second dataset.
- !
- CALL h5screate_simple_f(rank, dims2, dataspace_id, error)
-
- !
- ! Create the second dataset in group "Group_A" with default properties.
- !
- CALL h5dcreate_f(group_id, dsetname2, H5T_NATIVE_INTEGER, dataspace_id, &
- dataset_id, error)
-
- !
- ! Write the second dataset.
- !
- data_dims(1) = 2
- data_dims(1) = 10
- CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, dset2_data, data_dims, error)
-
- !
- ! Close the dataspace for the second dataset.
- !
- CALL h5sclose_f(dataspace_id, error)
-
- !
- ! Close the second dataset.
- !
- CALL h5dclose_f(dataset_id, error)
-
- !
- ! Close the group.
- !
- CALL h5gclose_f(group_id, error)
-
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
-
- !
- ! Close FORTRAN interface.
- !
- CALL h5close_f(error)
-
- END PROGRAM GRPDSETEXAMPLE
diff --git a/fortran/examples/grpsexample.f90 b/fortran/examples/grpsexample.f90
deleted file mode 100644
index 0f694e9..0000000
--- a/fortran/examples/grpsexample.f90
+++ /dev/null
@@ -1,83 +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. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-!
-! The following example code shows how to create groups
-! using absolute and relative names. It creates three groups:
-! the first two groups are created using the file identifier and
-! the group absolute names, and the third group is created using
-! a group identifier and the name relative to the specified group.
-!
-
-
- PROGRAM GRPSEXAMPLE
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
-
- CHARACTER(LEN=10), PARAMETER :: filename = "groupsf.h5" ! File name
- CHARACTER(LEN=8), PARAMETER :: groupname1 = "/MyGroup" ! Group name
- CHARACTER(LEN=16), PARAMETER :: groupname2 = "/MyGroup/Group_A"
- ! Group name
- CHARACTER(LEN=7), PARAMETER :: groupname3 = "Group_B" ! Group name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: group1_id, group2_id, group3_id ! Group identifiers
-
- INTEGER :: error ! Error flag
- !
- ! Initialize FORTRAN interface.
- !
- CALL h5open_f(error)
-
- !
- ! Create a new file using default properties.
- !
- CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
-
- !
- ! Create group "MyGroup" in the root group using absolute name.
- !
- CALL h5gcreate_f(file_id, groupname1, group1_id, error)
-
- !
- ! Create group "Group_A" in group "MyGroup" using absolute name.
- !
- CALL h5gcreate_f(file_id, groupname2, group2_id, error)
-
- !
- ! Create group "Group_B" in group "MyGroup" using relative name.
- !
- CALL h5gcreate_f(group1_id, groupname3, group3_id, error)
-
- !
- ! Close the groups.
- !
- CALL h5gclose_f(group1_id, error)
- CALL h5gclose_f(group2_id, error)
- CALL h5gclose_f(group3_id, error)
-
- !
- ! Terminate access to the file.
- !
- CALL h5fclose_f(file_id, error)
-
- !
- ! Close FORTRAN interface.
- !
- CALL h5close_f(error)
-
- END PROGRAM GRPSEXAMPLE
diff --git a/fortran/examples/h5_cmprss.f90 b/fortran/examples/h5_cmprss.f90
new file mode 100644
index 0000000..847a922
--- /dev/null
+++ b/fortran/examples/h5_cmprss.f90
@@ -0,0 +1,131 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! This example illustrates how to create a compressed dataset.
+! It is used in the HDF5 Tutorial.
+!
+PROGRAM h5_cmprss
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+ !
+ ! The dataset is stored in file "h5_cmprss.h5"
+ !
+ CHARACTER(LEN=12), PARAMETER :: filename = "h5_cmprss.h5"
+ INTEGER, PARAMETER :: rank = 2 ! Rank of the data set
+ INTEGER, PARAMETER :: dim0 = 100 ! Data set sizes
+ INTEGER, PARAMETER :: dim1 = 20
+
+ INTEGER(hid_t) :: file_id, dataset_id, dataspace_id ! Identifiers
+ INTEGER(hid_t) :: plist_id ! Property list identifier
+
+ INTEGER :: error
+ INTEGER(hsize_t), DIMENSION(1:rank) :: dims ! dimensions of data
+ INTEGER(hsize_t), DIMENSION(1:rank) :: cdims ! sizes of chunked data
+
+ INTEGER :: i,j, numfilt
+ INTEGER, DIMENSION(1:dim0,1:dim1) :: buf ! write buffer
+ INTEGER, DIMENSION(1:dim0,1:dim1) :: rbuf ! read buffer
+ INTEGER(HSIZE_T), DIMENSION(1:rank) :: data_dims ! dimensions of data buffers
+
+ INTEGER, DIMENSION(1:1) :: cd_values ! Auxiliary data for the filter
+ INTEGER(size_t) :: nelmts ! Number of elements in cd_values
+ INTEGER :: flags ! Bit vector specifying certain general properties of the filter
+ INTEGER(SIZE_T) :: namelen = 180 ! Anticipated number of characters in name
+ CHARACTER(LEN=180) :: name ! Name of the filter
+ INTEGER :: filter_id ! Filter identification number
+
+ ! Uncomment these variables to use SZIP compression
+ !INTEGER :: szip_options_mask
+ !INTEGER :: szip_pixels_per_block
+
+ !
+ !Initialize FORTRAN predifined datatypes
+ !
+ CALL h5open_f(error)
+ !
+ ! Create a file
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
+ !
+ ! Create dataset "Compressed Data" in the group using absolute name.
+ dims(1:2) = (/dim0, dim1/)
+ CALL h5screate_simple_f(rank, dims, dataspace_id, error)
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, plist_id, error)
+ !
+ ! Dataset must be chunked for compression
+ cdims(1:2) = 20
+ CALL h5pset_chunk_f(plist_id, 2, cdims, error)
+
+ ! Set ZLIB / DEFLATE Compression using compression level 6.
+ ! To use SZIP Compression comment out these lines.
+ CALL h5pset_deflate_f(plist_id, 6, error)
+
+ ! Uncomment these lines to set SZIP Compression
+ !szip_options_mask = H5_SZIP_NN_OM_F
+ !szip_pixels_per_block = 16
+ !CALL H5Pset_szip_f(plist_id, szip_options_mask, szip_pixels_per_block, error)
+
+ ! Create data set
+ CALL h5dcreate_f(file_id, "Compressed_Data", H5T_NATIVE_INTEGER, dataspace_id, &
+ dataset_id, error, dcpl_id=plist_id)
+
+ DO j = 1, dim1
+ DO i = 1, dim0
+ buf(i,j) = i+j
+ ENDDO
+ ENDDO
+
+ data_dims(1:2) = (/dim0,dim1/)
+ CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, buf, data_dims, error)
+
+ ! Close resources
+ CALL h5sclose_f(dataspace_id, error)
+ CALL h5pclose_f(plist_id, error)
+ CALL h5dclose_f(dataset_id, error)
+ CALL h5fclose_f(file_id, error)
+
+ ! Now reopen the file and dataset in the file.
+ CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error)
+ CALL h5dopen_f(file_id, "Compressed_Data", dataset_id, error)
+
+ ! Retrieve filter information.
+ CALL h5dget_create_plist_f(dataset_id, plist_id, error)
+
+ CALL h5pget_nfilters_f(plist_id, numfilt, error)
+ WRITE(*,'(A, I0)') "Number of filters associated with dataset: ", numfilt
+
+ DO i = 1, numfilt
+ nelmts = 1
+ CALL h5pget_filter_f(plist_id, 0, flags, nelmts, cd_values, &
+ namelen, name, filter_id, error)
+
+ WRITE(*,'(30X,A)', ADVANCE='NO')"Filter Type: "
+ IF(filter_id.EQ.H5Z_FILTER_DEFLATE_F)THEN
+ WRITE(*,'(A)') "H5Z_FILTER_DEFLATE"
+ ELSEIF (filter_id.EQ.H5Z_FILTER_SZIP_F)THEN
+ WRITE(*,'(A)') "H5Z_FILTER_SZIP"
+ ELSE
+ WRITE(*,'(A)') "Other filter type included"
+ ENDIF
+ ENDDO
+ data_dims(1:2) = (/dim0,dim1/)
+ CALL h5dread_f(dataset_id, H5T_NATIVE_INTEGER, rbuf, data_dims, error)
+
+ CALL h5dclose_f(dataset_id, error)
+ CALL h5pclose_f(plist_id, error)
+ CALL h5fclose_f(file_id, error)
+
+END PROGRAM h5_cmprss
diff --git a/fortran/examples/h5_crtatt.f90 b/fortran/examples/h5_crtatt.f90
new file mode 100644
index 0000000..79bc576
--- /dev/null
+++ b/fortran/examples/h5_crtatt.f90
@@ -0,0 +1,106 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! This example shows how to create and write a dataset attribute.
+! It opens the existing file 'dset.h5', obtains the identifier of
+! the dataset "/dset", defines attribute's dataspace,
+! creates dataset attribute, writes the attribute, and then closes
+! the attribute's dataspace, attribute, dataset, and file.
+!
+! This example is used in the HDF5 Tutorial.
+
+PROGRAM H5_CRTATT
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
+ CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
+ CHARACTER(LEN=9), PARAMETER :: aname = "attr_long" ! Attribute name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+ INTEGER(HID_T) :: attr_id ! Attribute identifier
+ INTEGER(HID_T) :: aspace_id ! Attribute Dataspace identifier
+ INTEGER(HID_T) :: atype_id ! Attribute Dataspace identifier
+ INTEGER(HSIZE_T), DIMENSION(1) :: adims = (/2/) ! Attribute dimension
+ INTEGER :: arank = 1 ! Attribure rank
+ INTEGER(SIZE_T) :: attrlen ! Length of the attribute string
+
+ CHARACTER(LEN=80), DIMENSION(2) :: attr_data ! Attribute data
+
+ INTEGER :: error ! Error flag
+ INTEGER(HSIZE_T), DIMENSION(1) :: data_dims
+
+ !
+ ! Initialize attribute's data
+ !
+ attr_data(1) = "Dataset character attribute"
+ attr_data(2) = "Some other string here "
+ attrlen = 80
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+ !
+ ! Open an existing file.
+ !
+ CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
+ !
+ ! Open an existing dataset.
+ !
+ CALL h5dopen_f(file_id, dsetname, dset_id, error)
+ !
+ ! Create scalar data space for the attribute.
+ !
+ CALL h5screate_simple_f(arank, adims, aspace_id, error)
+ !
+ ! Create datatype for the attribute.
+ !
+ CALL h5tcopy_f(H5T_NATIVE_CHARACTER, atype_id, error)
+ CALL h5tset_size_f(atype_id, attrlen, error)
+ !
+ ! Create dataset attribute.
+ !
+ CALL h5acreate_f(dset_id, aname, atype_id, aspace_id, attr_id, error)
+ !
+ ! Write the attribute data.
+ !
+ data_dims(1) = 2
+ CALL h5awrite_f(attr_id, atype_id, attr_data, data_dims, error)
+ !
+ ! Close the attribute.
+ !
+ CALL h5aclose_f(attr_id, error)
+ !
+ ! Terminate access to the data space.
+ !
+ CALL h5sclose_f(aspace_id, error)
+ !
+ ! End access to the dataset and release resources used by it.
+ !
+ CALL h5dclose_f(dset_id, error)
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_CRTATT
+
diff --git a/fortran/examples/h5_crtdat.f90 b/fortran/examples/h5_crtdat.f90
new file mode 100644
index 0000000..6e4c3a4
--- /dev/null
+++ b/fortran/examples/h5_crtdat.f90
@@ -0,0 +1,86 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!
+! The following example shows how to create an empty dataset.
+! It creates a file called 'dsetf.h5', defines the
+! dataset dataspace, creates a dataset which is a 4x6 integer array,
+! and then closes the dataspace, the dataset, and the file.
+!
+! This example is used in the HDF5 Tutorial.
+
+PROGRAM H5_CRTDAT
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
+ CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+ INTEGER(HID_T) :: dspace_id ! Dataspace identifier
+
+
+ INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions
+ INTEGER :: rank = 2 ! Dataset rank
+
+ INTEGER :: error ! Error flag
+
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+
+ !
+ ! Create a new file using default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
+
+ !
+ ! Create the dataspace.
+ !
+ CALL h5screate_simple_f(rank, dims, dspace_id, error)
+
+ !
+ ! Create the dataset with default properties.
+ !
+ CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dspace_id, &
+ dset_id, error)
+
+ !
+ ! End access to the dataset and release resources used by it.
+ !
+ CALL h5dclose_f(dset_id, error)
+
+ !
+ ! Terminate access to the data space.
+ !
+ CALL h5sclose_f(dspace_id, error)
+
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_CRTDAT
+
+
diff --git a/fortran/examples/groupexample.f90 b/fortran/examples/h5_crtgrp.f90
index 91ebc50..278d175 100644
--- a/fortran/examples/groupexample.f90
+++ b/fortran/examples/h5_crtgrp.f90
@@ -18,47 +18,47 @@
! It creates a file called 'group.h5', creates a group
! called MyGroup in the root group, and then closes the group and file.
!
+! This example is used in the HDF5 Tutorial.
+PROGRAM H5_CRTGRP
- PROGRAM GROUPEXAMPLE
+ USE HDF5 ! This module contains all necessary modules
- USE HDF5 ! This module contains all necessary modules
+ IMPLICIT NONE
- IMPLICIT NONE
+ CHARACTER(LEN=9), PARAMETER :: filename = "groupf.h5" ! File name
+ CHARACTER(LEN=7), PARAMETER :: groupname = "MyGroup" ! Group name
- CHARACTER(LEN=9), PARAMETER :: filename = "groupf.h5" ! File name
- CHARACTER(LEN=7), PARAMETER :: groupname = "MyGroup" ! Group name
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: group_id ! Group identifier
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: group_id ! Group identifier
+ INTEGER :: error ! Error flag
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+ !
+ ! Create a new file using default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
- INTEGER :: error ! Error flag
-!
-! Initialize FORTRAN interface.
-!
- CALL h5open_f(error)
- !
- ! Create a new file using default properties.
- !
- CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
-
- !
- ! Create a group named "/MyGroup" in the file.
- !
- CALL h5gcreate_f(file_id, groupname, group_id, error)
+ !
+ ! Create a group named "/MyGroup" in the file.
+ !
+ CALL h5gcreate_f(file_id, groupname, group_id, error)
- !
- ! Close the group.
- !
- CALL h5gclose_f(group_id, error)
+ !
+ ! Close the group.
+ !
+ CALL h5gclose_f(group_id, error)
- !
- ! Terminate access to the file.
- !
- CALL h5fclose_f(file_id, error)
-!
-! Close FORTRAN interface.
-!
- CALL h5close_f(error)
+ !
+ ! Terminate access to the file.
+ !
+ CALL h5fclose_f(file_id, error)
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
- END PROGRAM GROUPEXAMPLE
+END PROGRAM H5_CRTGRP
diff --git a/fortran/examples/h5_crtgrpar.f90 b/fortran/examples/h5_crtgrpar.f90
new file mode 100644
index 0000000..4ef008a
--- /dev/null
+++ b/fortran/examples/h5_crtgrpar.f90
@@ -0,0 +1,83 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!
+! The following example code shows how to create groups
+! using absolute and relative names. It creates three groups:
+! the first two groups are created using the file identifier and
+! the group absolute names, and the third group is created using
+! a group identifier and the name relative to the specified group.
+!
+! This example is used in the HDF5 Tutorial.
+
+PROGRAM H5_CRTGRPAR
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=10), PARAMETER :: filename = "groupsf.h5" ! File name
+ CHARACTER(LEN=8), PARAMETER :: groupname1 = "/MyGroup" ! Group name
+ CHARACTER(LEN=16), PARAMETER :: groupname2 = "/MyGroup/Group_A"
+ ! Group name
+ CHARACTER(LEN=7), PARAMETER :: groupname3 = "Group_B" ! Group name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: group1_id, group2_id, group3_id ! Group identifiers
+
+ INTEGER :: error ! Error flag
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+
+ !
+ ! Create a new file using default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
+
+ !
+ ! Create group "MyGroup" in the root group using absolute name.
+ !
+ CALL h5gcreate_f(file_id, groupname1, group1_id, error)
+
+ !
+ ! Create group "Group_A" in group "MyGroup" using absolute name.
+ !
+ CALL h5gcreate_f(file_id, groupname2, group2_id, error)
+
+ !
+ ! Create group "Group_B" in group "MyGroup" using relative name.
+ !
+ CALL h5gcreate_f(group1_id, groupname3, group3_id, error)
+
+ !
+ ! Close the groups.
+ !
+ CALL h5gclose_f(group1_id, error)
+ CALL h5gclose_f(group2_id, error)
+ CALL h5gclose_f(group3_id, error)
+
+ !
+ ! Terminate access to the file.
+ !
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_CRTGRPAR
diff --git a/fortran/examples/h5_crtgrpd.f90 b/fortran/examples/h5_crtgrpd.f90
new file mode 100644
index 0000000..d35f03d
--- /dev/null
+++ b/fortran/examples/h5_crtgrpd.f90
@@ -0,0 +1,155 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!
+! This example shows how to create a dataset in a particular group.
+! It opens the file created in the previous example and creates two datasets.
+! Absolute and relative dataset names are used.
+!
+! This example is used in the HDF5 Tutorial.
+
+PROGRAM H5_CRTGRPD
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=10), PARAMETER :: filename = "groupsf.h5" ! File name
+ CHARACTER(LEN=15), PARAMETER :: groupname = "MyGroup/Group_A" ! Group name
+ CHARACTER(LEN=13), PARAMETER :: dsetname1 = "MyGroup/dset1" ! Dataset name
+ CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! dataset name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: group_id ! Group identifier
+ INTEGER(HID_T) :: dataset_id ! Dataset identifier
+ INTEGER(HID_T) :: dataspace_id ! Data space identifier
+
+ INTEGER :: i, j
+ INTEGER :: error ! Error flag
+
+ INTEGER, DIMENSION(3,3) :: dset1_data ! Data arrays
+ INTEGER, DIMENSION(2,10) :: dset2_data !
+
+ INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/3,3/) ! Datasets dimensions
+ INTEGER(HSIZE_T), DIMENSION(2) :: dims2 = (/2,10/)!
+ INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
+
+ INTEGER :: rank = 2 ! Datasets rank
+
+ !
+ !Initialize dset1_data array
+ !
+ DO i = 1, 3
+ DO j = 1, 3
+ dset1_data(i,j) = j;
+ END DO
+ END DO
+
+ !
+ !Initialize dset2_data array
+ !
+ DO i = 1, 2
+ DO j = 1, 10
+ dset2_data(i,j) = j;
+ END DO
+ END DO
+
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+
+ !
+ ! Open an existing file.
+ !
+ CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
+
+ !
+ ! Create the data space for the first dataset.
+ !
+ CALL h5screate_simple_f(rank, dims1, dataspace_id, error)
+
+ !
+ ! Create a dataset in group "MyGroup" with default properties.
+ !
+ CALL h5dcreate_f(file_id, dsetname1, H5T_NATIVE_INTEGER, dataspace_id, &
+ dataset_id, error)
+
+ !
+ ! Write the first dataset.
+ !
+ data_dims(1) = 3
+ data_dims(2) = 3
+ CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, dset1_data, data_dims, error)
+
+ !
+ ! Close the dataspace for the first dataset.
+ !
+ CALL h5sclose_f(dataspace_id, error)
+
+ !
+ ! Close the first dataset.
+ !
+ CALL h5dclose_f(dataset_id, error)
+
+ !
+ ! Open an existing group in the specified file.
+ !
+ CALL h5gopen_f(file_id, groupname, group_id, error)
+
+ !
+ !Create the data space for the second dataset.
+ !
+ CALL h5screate_simple_f(rank, dims2, dataspace_id, error)
+
+ !
+ ! Create the second dataset in group "Group_A" with default properties.
+ !
+ CALL h5dcreate_f(group_id, dsetname2, H5T_NATIVE_INTEGER, dataspace_id, &
+ dataset_id, error)
+
+ !
+ ! Write the second dataset.
+ !
+ data_dims(1) = 2
+ data_dims(1) = 10
+ CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, dset2_data, data_dims, error)
+
+ !
+ ! Close the dataspace for the second dataset.
+ !
+ CALL h5sclose_f(dataspace_id, error)
+
+ !
+ ! Close the second dataset.
+ !
+ CALL h5dclose_f(dataset_id, error)
+
+ !
+ ! Close the group.
+ !
+ CALL h5gclose_f(group_id, error)
+
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_CRTGRPD
diff --git a/fortran/examples/h5_extend.f90 b/fortran/examples/h5_extend.f90
new file mode 100644
index 0000000..1316281
--- /dev/null
+++ b/fortran/examples/h5_extend.f90
@@ -0,0 +1,233 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! This example extends an HDF5 dataset. It is used in the HDF5 Tutorial.
+
+PROGRAM H5_EXTEND
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ !
+ !the dataset is stored in file "extend.h5"
+ !
+ CHARACTER(LEN=9), PARAMETER :: filename = "extend.h5"
+
+ !
+ !dataset rank is 2 and name is "ExtendibleArray"
+ !
+ CHARACTER(LEN=15), PARAMETER :: dsetname = "ExtendibleArray"
+ INTEGER :: RANK = 2
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+ INTEGER(HID_T) :: dataspace ! Dataspace identifier
+ INTEGER(HID_T) :: memspace ! Memory dataspace identifier
+ INTEGER(HID_T) :: crp_list ! Dataset creation property identifier
+
+ !
+ !dataset dimensions at creation time
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dims = (/3,3/)
+
+ !
+ !data dimensions
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dimsc = (/2,5/)
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dimsm = (/3,7/)
+
+ !
+ !Maximum dimensions
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims
+
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: offset
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: count
+
+ !
+ ! Variables for reading and writing
+ !
+ INTEGER, DIMENSION(1:3,1:3) :: data1
+ INTEGER, DIMENSION(1:21) :: data2 = &
+ (/2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4/)
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: data_dims
+
+ !
+ !Size of data in the file
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: size
+
+ !
+ !general purpose integer
+ !
+ INTEGER :: i, j
+
+ !
+ !flag to check operation success
+ !
+ INTEGER :: error
+
+ !
+ !Variables used in reading data back
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dimsr, maxdimsr
+ INTEGER :: rankr
+ INTEGER, DIMENSION(1:3,1:10) :: rdata
+
+ !
+ !Initialize FORTRAN predifined datatypes
+ !
+ CALL h5open_f(error)
+
+ !
+ !Create a new file using default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
+
+ !
+ !Create the data space with unlimited dimensions.
+ !
+ maxdims = (/H5S_UNLIMITED_F, H5S_UNLIMITED_F/)
+
+ CALL h5screate_simple_f(RANK, dims, dataspace, error, maxdims)
+
+ !
+ !Modify dataset creation properties, i.e. enable chunking
+ !
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error)
+
+ CALL h5pset_chunk_f(crp_list, RANK, dimsc, error)
+
+ !
+ !Create a dataset with 3X3 dimensions using cparms creation propertie .
+ !
+ CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dataspace, &
+ dset_id, error, crp_list )
+ CALL h5sclose_f(dataspace, error)
+
+ !
+ !Fill data array with 1's
+ !
+ DO i = 1, dims(1)
+ DO j = 1, dims(2)
+ data1(i,j) = 1
+ END DO
+ END DO
+
+ !
+ !Write data array to dataset
+ !
+ data_dims(1:2) = (/3,3/)
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data1, data_dims, error)
+
+ !
+ !Extend the dataset. Dataset becomes 10 x 3.
+ !
+ size(1:2) = (/3,10/)
+ CALL h5dset_extent_f(dset_id, size, error)
+
+ offset(1:2) = (/0,3/)
+ count(1:2) = (/3,7/)
+
+ CALL h5screate_simple_f (2, dimsm, memspace, error)
+
+ !
+ !Write to 3x7 extended part of dataset
+ !
+ CALL h5dget_space_f(dset_id, dataspace, error)
+ CALL h5sselect_hyperslab_f(dataspace, H5S_SELECT_SET_F, &
+ offset, count, error)
+
+ data_dims(1:2) = (/3,7/)
+ CALL H5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data2, data_dims, error, &
+ memspace, dataspace)
+
+ !
+ !Close the objects that were opened.
+ !
+ CALL h5sclose_f(dataspace, error)
+ CALL h5pclose_f(crp_list, error)
+ CALL h5dclose_f(dset_id, error)
+ CALL h5fclose_f(file_id, error)
+
+ !
+ !read the data back
+ !
+ !Open the file.
+ !
+ CALL h5fopen_f (filename, H5F_ACC_RDONLY_F, file_id, error)
+
+ !
+ !Open the dataset.
+ !
+ CALL h5dopen_f(file_id, dsetname, dset_id, error)
+
+ !
+ !Get dataset's dataspace handle.
+ !
+ CALL h5dget_space_f(dset_id, dataspace, error)
+
+ !
+ !Get dataspace's rank.
+ !
+ CALL h5sget_simple_extent_ndims_f(dataspace, rankr, error)
+
+ !
+ !Get dataspace's dimensions.
+ !
+ CALL h5sget_simple_extent_dims_f(dataspace, dimsr, maxdimsr, error)
+
+ !
+ !Get creation property list.
+ !
+ CALL h5dget_create_plist_f(dset_id, crp_list, error)
+
+ !
+ ! Fill read buffer with zeroes
+ !
+ rdata(1:dimsr(1),1:dimsr(2)) = 0
+
+ !
+ !create memory dataspace
+ !
+ CALL h5screate_simple_f(rankr, dimsr, memspace, error)
+
+ !
+ !Read data
+ !
+ data_dims(1:2) = (/3,10/)
+ CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, rdata, data_dims, &
+ error, memspace, dataspace)
+
+ WRITE(*,'(A)') "Dataset:"
+ DO i = 1, dimsr(1)
+ WRITE(*,'(100(I0,1X))') rdata(i,1:dimsr(2))
+ END DO
+
+ !
+ !Close the objects that were opened.
+ !
+ CALL h5sclose_f(dataspace, error)
+ CALL h5sclose_f(memspace, error)
+ CALL h5pclose_f(crp_list, error)
+ CALL h5dclose_f(dset_id, error)
+ CALL h5fclose_f(file_id, error)
+
+ !Close FORTRAN predefined datatypes
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_EXTEND
diff --git a/fortran/examples/h5_rdwt.f90 b/fortran/examples/h5_rdwt.f90
new file mode 100644
index 0000000..ba05b2f
--- /dev/null
+++ b/fortran/examples/h5_rdwt.f90
@@ -0,0 +1,96 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!
+! The following example shows how to write and read to/from an existing dataset.
+! It opens the file created in the previous example, obtains the dataset
+! identifier, writes the data to the dataset in the file,
+! then reads the dataset to memory.
+!
+! This example is used in the HDF5 Tutorial.
+
+PROGRAM H5_RDWT
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
+ CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+
+ INTEGER :: error ! Error flag
+ INTEGER :: i, j
+
+ INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers
+ INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
+
+ !
+ ! Initialize the dset_data array.
+ !
+ DO i = 1, 4
+ DO j = 1, 6
+ dset_data(i,j) = (i-1)*6 + j
+ END DO
+ END DO
+
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+
+ !
+ ! Open an existing file.
+ !
+ CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
+
+ !
+ ! Open an existing dataset.
+ !
+ CALL h5dopen_f(file_id, dsetname, dset_id, error)
+
+ !
+ ! Write the dataset.
+ !
+ data_dims(1) = 4
+ data_dims(2) = 6
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error)
+
+ !
+ ! Read the dataset.
+ !
+ CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error)
+
+ !
+ ! Close the dataset.
+ !
+ CALL h5dclose_f(dset_id, error)
+
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_RDWT
+
+
+
diff --git a/fortran/examples/h5_subset.f90 b/fortran/examples/h5_subset.f90
new file mode 100644
index 0000000..6cb8f7a
--- /dev/null
+++ b/fortran/examples/h5_subset.f90
@@ -0,0 +1,184 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! This example shows how to write and read a hyperslab.
+! It is used in the HDF5 Tutorial.
+!
+
+PROGRAM H5_SUBSET
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=9), PARAMETER :: filename = "subset.h5" ! File name
+ CHARACTER(LEN=8), PARAMETER :: dsetname = "IntArray" ! Dataset name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+ INTEGER(HID_T) :: dataspace ! Dataspace identifier
+ INTEGER(HID_T) :: memspace ! memspace identifier
+
+ !
+ ! To change the subset size, modify size of dimsm, sdata, dim0_sub,
+ ! dim1_sub, and count
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dimsm = (/4,3/) ! Dataset dimensions
+ INTEGER, DIMENSION(1:4,1:3) :: sdata ! Subset buffer
+ INTEGER :: dim0_sub = 4
+ INTEGER :: dim1_sub = 3
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: count = (/4,3/) ! Size of hyperslab
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: offset = (/2,1/) ! Hyperslab offset
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: stride = (/1,1/) ! Hyperslab stride
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: block = (/1,1/) ! Hyperslab block size
+
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dimsf = (/10,8/) ! Dataset dimensions
+
+
+ INTEGER, DIMENSION(1:10,1:8) :: data ! Data to write
+ INTEGER, DIMENSION(1:10,1:8) :: rdata ! Data to read
+
+ INTEGER :: rank = 2 ! Dataset rank ( in file )
+ INTEGER :: dim0 = 10 ! Dataset size in file
+ INTEGER :: dim1 = 8
+
+ INTEGER :: i, j
+
+ INTEGER :: error ! Error flag
+ INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
+
+ !
+ ! Write data to the HDF5 file.
+ !
+
+ !
+ ! Data initialization.
+ !
+ DO i = 1, dim0
+ DO j = 1, dim1
+ IF (i .LE. (dim0 / 2)) THEN
+ data(i,j) = 1
+ ELSE
+ data(i,j) = 2
+ END IF
+ END DO
+ END DO
+
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+
+ !
+ ! Create a new file using default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
+
+ !
+ ! Create the data space for the dataset.
+ !
+ CALL h5screate_simple_f(rank, dimsf, dataspace, error)
+
+ !
+ ! Create the dataset with default properties.
+ !
+ CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dataspace, &
+ dset_id, error)
+
+ !
+ ! Write the dataset.
+ !
+ data_dims(1) = dim0
+ data_dims(2) = dim1
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, data_dims, error)
+
+ !
+ ! Data Written to File
+ !
+ WRITE(*,'(/,A)') "Original Data Written to File:"
+ DO i = 1, dim0
+ WRITE(*,'(100(1X,I0,1X))') DATA(i,1:dim1)
+ END DO
+
+ !
+ !
+ ! Close the dataspace, dataset, and file.
+ !
+ CALL h5sclose_f(dataspace, error)
+ CALL h5dclose_f(dset_id, error)
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Initialize subset data array.
+ !
+ sdata(1:dim0_sub,1:dim1_sub) = 5
+
+ !
+ ! Open the file.
+ !
+ CALL h5fopen_f(filename, H5F_ACC_RDWR_F, file_id, error)
+
+ !
+ ! Open the dataset.
+ !
+ CALL h5dopen_f(file_id, dsetname, dset_id, error)
+
+ !
+ ! Get dataset's dataspace identifier and select subset.
+ !
+ CALL h5dget_space_f(dset_id, dataspace, error)
+ CALL h5sselect_hyperslab_f(dataspace, H5S_SELECT_SET_F, &
+ offset, count, error, stride, BLOCK)
+ !
+ ! Create memory dataspace.
+ !
+ CALL h5screate_simple_f(rank, dimsm, memspace, error)
+
+ WRITE(*,'(/,A)') "Write subset to file specifying:"
+ WRITE(*,'(A,/)') " offset=2x1 stride=1x1 count=4x3 block=1x1"
+
+ !
+ ! Write subset to dataset
+ !
+ data_dims(1:2) = (/dim0_sub, dim1_sub/)
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, sdata, data_dims, error, &
+ memspace, dataspace)
+
+ data_dims(1:2) = (/dim0, dim1/)
+ CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, rdata, data_dims, error)
+
+ !
+ ! Read entire dataset back
+ !
+ WRITE(*,'(A)') "Data in File after Subset Written:"
+ DO i = 1, dim0
+ WRITE(*,'(100(1X,I0,1X))') rdata(i,1:dim1)
+ END DO
+ PRINT *, " "
+
+ !
+ ! Close everything opened.
+ !
+ CALL h5sclose_f(dataspace, error)
+ CALL h5sclose_f(memspace, error)
+ CALL h5dclose_f(dset_id, error)
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_SUBSET
diff --git a/fortran/examples/run-fortran-ex.sh.in b/fortran/examples/run-fortran-ex.sh.in
index 873669f..c5c379e 100644
--- a/fortran/examples/run-fortran-ex.sh.in
+++ b/fortran/examples/run-fortran-ex.sh.in
@@ -70,20 +70,24 @@ RunTest()
# Run tests
if [ $? -eq 0 ]
then
- if (RunTest dsetexample &&\
- rm dsetexample &&\
- RunTest fileexample &&\
- rm fileexample &&\
- RunTest rwdsetexample &&\
- rm rwdsetexample &&\
- RunTest attrexample &&\
- rm attrexample &&\
- RunTest groupexample &&\
- rm groupexample &&\
- RunTest grpsexample &&\
- rm grpsexample &&\
- RunTest grpdsetexample &&\
- rm grpdsetexample &&\
+ if (RunTest h5_cmprss &&\
+ rm h5_cmprss &&\
+ RunTest h5_crtdat &&\
+ rm h5_crtdat &&\
+ RunTest h5_extend &&\
+ rm h5_extend &&\
+ RunTest h5_rdwt &&\
+ rm h5_rdwt &&\
+ RunTest h5_crtatt &&\
+ rm h5_crtatt &&\
+ RunTest h5_crtgrp &&\
+ rm h5_crtgrp &&\
+ RunTest h5_crtgrpar &&\
+ rm h5_crtgrpar &&\
+ RunTest h5_crtgrpd &&\
+ rm h5_crtgrpd &&\
+ RunTest h5_subset &&\
+ rm h5_subset &&\
RunTest hyperslab &&\
rm hyperslab &&\
RunTest selectele &&\
diff --git a/fortran/examples/rwdsetexample.f90 b/fortran/examples/rwdsetexample.f90
deleted file mode 100644
index 1e84e23..0000000
--- a/fortran/examples/rwdsetexample.f90
+++ /dev/null
@@ -1,96 +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. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-!
-! The following example shows how to write and read to/from an existing dataset.
-! It opens the file created in the previous example, obtains the dataset
-! identifier, writes the data to the dataset in the file,
-! then reads the dataset to memory.
-!
-
-
- PROGRAM RWDSETEXAMPLE
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
-
- CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
- CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: dset_id ! Dataset identifier
-
- INTEGER :: error ! Error flag
- INTEGER :: i, j
-
- INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers
- INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
-
- !
- ! Initialize the dset_data array.
- !
- do i = 1, 4
- do j = 1, 6
- dset_data(i,j) = (i-1)*6 + j;
- end do
- end do
-
- !
- ! Initialize FORTRAN interface.
- !
- CALL h5open_f(error)
-
- !
- ! Open an existing file.
- !
- CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
-
- !
- ! Open an existing dataset.
- !
- CALL h5dopen_f(file_id, dsetname, dset_id, error)
-
- !
- ! Write the dataset.
- !
- data_dims(1) = 4
- data_dims(2) = 6
- CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error)
-
- !
- ! Read the dataset.
- !
- CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error)
-
- !
- ! Close the dataset.
- !
- CALL h5dclose_f(dset_id, error)
-
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
-
- !
- ! Close FORTRAN interface.
- !
- CALL h5close_f(error)
-
- END PROGRAM RWDSETEXAMPLE
-
-
-
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 374bc44..c41916a 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_F90_SRC C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -188,6 +188,7 @@ SET (f90_F_SRCS
${HDF5_F90_SRC_SOURCE_DIR}/H5Aff${F_STATUS}.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5Dff${F_STATUS}.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5Eff${F_STATUS}.f90
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5Fff${F_STATUS}.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5Lff${F_STATUS}.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5Off${F_STATUS}.f90
${HDF5_F90_SRC_SOURCE_DIR}/H5Pff${F_STATUS}.f90
diff --git a/fortran/src/H5Aff.f90 b/fortran/src/H5Aff.f90
index 1926dd1..25f7fa7 100644
--- a/fortran/src/H5Aff.f90
+++ b/fortran/src/H5Aff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5A function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Aff_F03.f90 b/fortran/src/H5Aff_F03.f90
index b9e6c92..26c911a 100644
--- a/fortran/src/H5Aff_F03.f90
+++ b/fortran/src/H5Aff_F03.f90
@@ -61,7 +61,7 @@
! (B)
! *** IMPORTANT ***
! If you add a new H5A function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Aff_F90.f90 b/fortran/src/H5Aff_F90.f90
index 7e14f7a..974b023 100644
--- a/fortran/src/H5Aff_F90.f90
+++ b/fortran/src/H5Aff_F90.f90
@@ -33,7 +33,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5A function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Dff.f90 b/fortran/src/H5Dff.f90
index b1e1df1..3ad868c 100644
--- a/fortran/src/H5Dff.f90
+++ b/fortran/src/H5Dff.f90
@@ -30,7 +30,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Dff_F03.f90 b/fortran/src/H5Dff_F03.f90
index 61d5dfc..be4bd69 100644
--- a/fortran/src/H5Dff_F03.f90
+++ b/fortran/src/H5Dff_F03.f90
@@ -74,7 +74,7 @@
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Dff_F90.f90 b/fortran/src/H5Dff_F90.f90
index 3bb0fc0..46ea3ad 100644
--- a/fortran/src/H5Dff_F90.f90
+++ b/fortran/src/H5Dff_F90.f90
@@ -42,7 +42,7 @@
! (3)
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5Eff.f90 b/fortran/src/H5Eff.f90
index 2e137df..7b56376 100644
--- a/fortran/src/H5Eff.f90
+++ b/fortran/src/H5Eff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5E function to the module you must add the function name
-! to the Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! to the Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Eff_F03.f90 b/fortran/src/H5Eff_F03.f90
index 164f203..3ba3ce96 100644
--- a/fortran/src/H5Eff_F03.f90
+++ b/fortran/src/H5Eff_F03.f90
@@ -33,7 +33,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5E function to the module you must add the function name
-! to the Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! to the Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Eff_F90.f90 b/fortran/src/H5Eff_F90.f90
index e698a84..158ec12 100644
--- a/fortran/src/H5Eff_F90.f90
+++ b/fortran/src/H5Eff_F90.f90
@@ -28,7 +28,7 @@
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5FDmpioff.f90 b/fortran/src/H5FDmpioff.f90
index d9faef3..5c81bc8 100644
--- a/fortran/src/H5FDmpioff.f90
+++ b/fortran/src/H5FDmpioff.f90
@@ -26,7 +26,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5P function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index 1259d4d..4910aca 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -679,3 +679,37 @@ nh5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size)
done:
return ret_value;
}
+
+/****if* H5Ff/h5fget_file_image_c
+ * NAME
+ * h5fget_file_image_c
+ * PURPOSE
+ * Calls h5fget_file_image
+ * INPUTS
+ * file_id - Target file identifier.
+ * buf_ptr - Pointer to the buffer into which the image of the HDF5 file is to be copied.
+ * buf_len - Size of the supplied buffer.
+ * OUTPUTS
+ * buf_req - The size in bytes of the buffer required to store the file image.
+ * RETURNS
+ * 0 on success, -1 on failure
+ * AUTHOR
+ * M. Scot Breitenfeld
+ * November 26, 2012
+ * SOURCE
+*/
+int_f
+nh5fget_file_image_c(hid_t_f *file_id, void *buf_ptr, size_t_f *buf_len, size_t_f *buf_req)
+/******/
+{
+ herr_t ret_value=0; /* Return value */
+
+ /*
+ * Call h5fget_file_image function
+ */
+ if ((*buf_req = (size_t_f)H5Fget_file_image((hid_t)*file_id, buf_ptr, (size_t)*buf_len)) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ return ret_value;
+}
diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90
index 0c70ad4..faa1967 100644
--- a/fortran/src/H5Fff.f90
+++ b/fortran/src/H5Fff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5F function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Fff_F03.f90 b/fortran/src/H5Fff_F03.f90
new file mode 100644
index 0000000..1ccd39a
--- /dev/null
+++ b/fortran/src/H5Fff_F03.f90
@@ -0,0 +1,104 @@
+!****h* ROBODoc/H5F (F03)
+!
+! NAME
+! H5F_PROVISIONAL
+!
+! PURPOSE
+! This file contains Fortran 2003 interfaces for H5F functions.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! NOTES
+! *** IMPORTANT ***
+! If you add a new H5T function you must add the function name to the
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
+! This is needed for Windows based operating systems.
+!
+!*****
+
+
+MODULE H5F_PROVISIONAL
+
+ USE H5GLOBAL
+ USE, INTRINSIC :: ISO_C_BINDING
+
+
+CONTAINS
+!****s* H5F (F03)/h5fget_file_image_f_F03
+!
+! NAME
+! h5fget_file_image_f
+!
+! PURPOSE
+! Retrieves a copy of the image of an existing, open file.
+!
+! Inputs:
+! file_id - Target file identifier.
+! buf_ptr - Pointer to the buffer into which the image of the HDF5 file is to be copied.
+! buf_len - Size of the supplied buffer.
+!
+! Outputs:
+! hdferr - error code:
+! 0 on success and -1 on failure
+! Optional:
+! buf_size - The size in bytes of the buffer required to store the file image.
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! November 26, 2012
+!
+! Fortran2003 Interface:
+ SUBROUTINE h5fget_file_image_f(file_id, buf_ptr, buf_len, hdferr, buf_size)
+ USE, INTRINSIC :: ISO_C_BINDING
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: file_id
+ TYPE(C_PTR) , INTENT(INOUT) :: buf_ptr
+ INTEGER(SIZE_T) , INTENT(IN) :: buf_len
+ INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: buf_size
+ INTEGER , INTENT(OUT) :: hdferr
+!*****
+
+ INTEGER(SIZE_T) :: buf_size_default
+
+ INTERFACE
+ INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size)
+ USE, INTRINSIC :: ISO_C_BINDING
+ USE H5GLOBAL
+ !DEC$IF DEFINED(HDF5F90_WINDOWS)
+ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FILE_IMAGE_C'::h5fget_file_image_c
+ !DEC$ENDIF
+ INTEGER(HID_T) , INTENT(IN) :: file_id
+ TYPE(C_PTR) , VALUE :: buf_ptr
+ INTEGER(SIZE_T) , INTENT(IN) :: buf_len
+ INTEGER(SIZE_T), INTENT(IN) :: buf_size
+ END FUNCTION h5fget_file_image_c
+ END INTERFACE
+
+
+ IF(PRESENT(buf_size))THEN
+ buf_ptr = C_NULL_PTR
+ ENDIF
+
+ hdferr = h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size_default)
+
+ IF(PRESENT(buf_size))THEN
+ buf_size = buf_size_default
+ ENDIF
+
+ END SUBROUTINE h5fget_file_image_f
+
+END MODULE H5F_PROVISIONAL
diff --git a/fortran/examples/fileexample.f90 b/fortran/src/H5Fff_F90.f90
index 87119d2..b6e659b 100644
--- a/fortran/examples/fileexample.f90
+++ b/fortran/src/H5Fff_F90.f90
@@ -1,3 +1,16 @@
+!****h* ROBODoc/H5F (F90)
+!
+! NAME
+! H5F_PROVISIONAL
+!
+! PURPOSE
+! This file contains Fortran 90 interfaces for H5F functions. It
+! containsthe same functions as H5Fff_F03.f90, when applicable,
+! but excludes the Fortran 2003 functions and the interface listings.
+! This file will be compiled instead of H5Fff_F03.f90 if Fortran 2003
+! functions are not enabled.
+!
+! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
! Copyright by The HDF Group. *
! Copyright by the Board of Trustees of the University of Illinois. *
@@ -13,37 +26,18 @@
! access to either file, you may request a copy from help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
+! NOTES
+! *** IMPORTANT ***
+! If you add a new H5F function you must add the function name to the
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
+! This is needed for Windows based operating systems.
!
-! The following example demonstrates how to create and close an HDF5 file.
-! It creates a file called 'file.h5', and then closes the file.
-!
-
- PROGRAM FILEEXAMPLE
-
- USE HDF5 ! This module contains all necessary modules
+!*****
- IMPLICIT NONE
- CHARACTER(LEN=8), PARAMETER :: filename = "filef.h5" ! File name
- INTEGER(HID_T) :: file_id ! File identifier
+MODULE H5F_PROVISIONAL
- INTEGER :: error ! Error flag
+ USE H5GLOBAL
+ IMPLICIT NONE
-!
-! Initialize FORTRAN interface.
-!
- CALL h5open_f (error)
- !
- ! Create a new file using default properties.
- !
- CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
-
- !
- ! Terminate access to the file.
- !
- CALL h5fclose_f(file_id, error)
-!
-! Close FORTRAN interface.
-!
- CALL h5close_f(error)
- END PROGRAM FILEEXAMPLE
+END MODULE H5F_PROVISIONAL
diff --git a/fortran/src/H5Gff.f90 b/fortran/src/H5Gff.f90
index 155185a..d4d7496 100644
--- a/fortran/src/H5Gff.f90
+++ b/fortran/src/H5Gff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5G function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Iff.f90 b/fortran/src/H5Iff.f90
index 86e88b9..7c9a843 100644
--- a/fortran/src/H5Iff.f90
+++ b/fortran/src/H5Iff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5I function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c
index e5b01ed..c5138b6 100644
--- a/fortran/src/H5Lf.c
+++ b/fortran/src/H5Lf.c
@@ -725,7 +725,7 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
if(NULL == (c_name = (char *)HDmalloc(c_size)))
HGOTO_DONE(FAIL)
- if((*size = (size_t)H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field,
+ if((*size = (size_t_f)H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field,
(H5_iter_order_t)*order, (hsize_t)*n,c_name, c_size, (hid_t)*lapl_id)) < 0)
HGOTO_DONE(FAIL)
diff --git a/fortran/src/H5Lff.f90 b/fortran/src/H5Lff.f90
index 8043d74..4660e52 100644
--- a/fortran/src/H5Lff.f90
+++ b/fortran/src/H5Lff.f90
@@ -27,7 +27,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5L function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Lff_F03.f90 b/fortran/src/H5Lff_F03.f90
index e2c54a7..83f80ac 100644
--- a/fortran/src/H5Lff_F03.f90
+++ b/fortran/src/H5Lff_F03.f90
@@ -32,7 +32,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5A function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Lff_F90.f90 b/fortran/src/H5Lff_F90.f90
index c802af7..dd62b7b 100644
--- a/fortran/src/H5Lff_F90.f90
+++ b/fortran/src/H5Lff_F90.f90
@@ -30,7 +30,7 @@
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90
index ce8c55c..1437e9f 100644
--- a/fortran/src/H5Off.f90
+++ b/fortran/src/H5Off.f90
@@ -31,7 +31,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5O function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Off_F03.f90 b/fortran/src/H5Off_F03.f90
index f4ddd3e..0cf4d46 100644
--- a/fortran/src/H5Off_F03.f90
+++ b/fortran/src/H5Off_F03.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5P function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Off_F90.f90 b/fortran/src/H5Off_F90.f90
index 53553d6..5688c5d 100644
--- a/fortran/src/H5Off_F90.f90
+++ b/fortran/src/H5Off_F90.f90
@@ -30,7 +30,7 @@
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 6fc8487..dba2aa4 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -1937,28 +1937,29 @@ DONE:
/****if* H5Pf/h5pset_external_c
* NAME
- * h5pset_external_c
+ * h5pset_external_c
* PURPOSE
- * Call H5Pset_external to add an external file to the
- * list of external files.
+ * Call H5Pset_external to add an external file to the
+ * list of external files.
* INPUTS
- * prp_id - property list identifier
- * name - Name of an external file
- * namelen - length of name
- * offset - Offset, in bytes, from the beginning of the file
- * to the location in the file where the data starts.
- * bytes - Number of bytes reserved in the file for the data.
+ * prp_id - property list identifier
+ * name - Name of an external file
+ * namelen - length of name
+ * offset - Offset, in bytes, from the beginning of the file
+ * to the location in the file where the data starts.
+ * bytes - Number of bytes reserved in the file for the data.
* RETURNS
- * 0 on success, -1 on failure
+ * 0 on success, -1 on failure
* AUTHOR
* Xiangyang Su
- * Wednesday, February 23, 2000
+ * Wednesday, February 23, 2000
* HISTORY
- *
+ * Changed type of 'offset' from int_f to off_t_f -- MSB January 9, 2012
+ *
* SOURCE
*/
int_f
-nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, int_f* offset, hsize_t_f*bytes)
+nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes)
/******/
{
int ret_value = -1;
@@ -2029,14 +2030,14 @@ nh5pget_external_count_c (hid_t_f *prp_id, int_f* count)
/****if* H5Pf/h5pget_external_c
* NAME
- * h5pget_external_c
+ * h5pget_external_c
* PURPOSE
- * Call H5Pget_external to get nformation about an external file.
+ * Call H5Pget_external to get nformation about an external file.
* INPUTS
* prp_id - property list identifier
* name_size - length of name
* idx - External file index.
- *OUTPUT
+ * OUTPUT
* name - Name of an external file
* offset - Offset, in bytes, from the beginning of the file
* to the location in the file where the data starts.
@@ -2047,11 +2048,12 @@ nh5pget_external_count_c (hid_t_f *prp_id, int_f* count)
* Xiangyang Su
* Wednesday, February 23, 2000
* HISTORY
+ * Changed type of 'offset' from integer to off_t -- MSB January 9, 2012
*
* SOURCE
*/
int_f
-nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, int_f* offset, hsize_t_f*bytes)
+nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, off_t_f* offset, hsize_t_f*bytes)
/******/
{
int ret_value = -1;
@@ -2079,7 +2081,7 @@ nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name,
if (status < 0) goto DONE;
- *offset = (int_f)c_offset;
+ *offset = (off_t_f)c_offset;
*bytes = (hsize_t_f)size;
/* Note: if the size of the fortran buffer is larger then the returned string
* from the function then we need to give HD5packFstring the fortran buffer size so
diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90
index 4254b7f..a3c9a60 100644
--- a/fortran/src/H5Pff.f90
+++ b/fortran/src/H5Pff.f90
@@ -27,7 +27,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5P function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
@@ -2329,14 +2329,16 @@ CONTAINS
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
-! port). March 14, 2001
+! port). March 14, 2001
+!
+! Changed type of 'offset' from integer to off_t -- MSB January 9, 2012
!
! Fortran90 Interface:
- SUBROUTINE h5pset_external_f(prp_id, name, offset,bytes, hdferr)
+ SUBROUTINE h5pset_external_f(prp_id, name, offset, bytes, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an external file
- INTEGER, INTENT(IN) :: offset ! Offset, in bytes, from the beginning
+ INTEGER(OFF_T), INTENT(IN) :: offset ! Offset, in bytes, from the beginning
! of the file to the location in the file
! where the data starts.
INTEGER(HSIZE_T), INTENT(IN) :: bytes ! Number of bytes reserved in the
@@ -2347,9 +2349,6 @@ CONTAINS
INTEGER :: namelen
-! INTEGER, EXTERNAL :: h5pset_external_c
-! MS FORTRAN needs explicit interface for C functions called here.
-!
INTERFACE
INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes)
USE H5GLOBAL
@@ -2360,7 +2359,7 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: prp_id
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER :: namelen
- INTEGER, INTENT(IN) :: offset
+ INTEGER(OFF_T), INTENT(IN) :: offset
INTEGER(HSIZE_T), INTENT(IN) :: bytes
END FUNCTION h5pset_external_c
END INTERFACE
@@ -2453,7 +2452,9 @@ CONTAINS
! HISTORY
! Explicit Fortran interfaces were added for
! called C functions (it is needed for Windows
-! port). March 14, 2001
+! port). March 14, 2001
+!
+! Changed type of 'offset' from integer to off_t -- MSB January 9, 2012
!
! Fortran90 Interface:
SUBROUTINE h5pget_external_f(prp_id, idx, name_size, name, offset,bytes, hdferr)
@@ -2462,7 +2463,7 @@ CONTAINS
INTEGER, INTENT(IN) :: idx ! External file index.
INTEGER(SIZE_T), INTENT(IN) :: name_size ! Maximum length of name array
CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of an external file
- INTEGER, INTENT(OUT) :: offset ! Offset, in bytes, from the beginning
+ INTEGER(OFF_T), INTENT(OUT) :: offset ! Offset, in bytes, from the beginning
! of the file to the location in the file
! where the data starts.
INTEGER(HSIZE_T), INTENT(OUT) :: bytes ! Number of bytes reserved in the
@@ -2485,7 +2486,7 @@ CONTAINS
INTEGER, INTENT(IN) :: idx
INTEGER(SIZE_T), INTENT(IN) :: name_size
CHARACTER(LEN=*), INTENT(OUT) :: name
- INTEGER, INTENT(OUT) :: offset
+ INTEGER(OFF_T), INTENT(OUT) :: offset
INTEGER(HSIZE_T), INTENT(OUT) :: bytes
END FUNCTION h5pget_external_c
END INTERFACE
diff --git a/fortran/src/H5Pff_F03.f90 b/fortran/src/H5Pff_F03.f90
index b601e69..7fb6ff9 100644
--- a/fortran/src/H5Pff_F03.f90
+++ b/fortran/src/H5Pff_F03.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5P function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Pff_F90.f90 b/fortran/src/H5Pff_F90.f90
index ebdd185..5b75643 100644
--- a/fortran/src/H5Pff_F90.f90
+++ b/fortran/src/H5Pff_F90.f90
@@ -29,7 +29,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5P function you must add the function name to the
-! Windows dll file '*hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5Rff.f90 b/fortran/src/H5Rff.f90
index 89ffc10..64f1365 100644
--- a/fortran/src/H5Rff.f90
+++ b/fortran/src/H5Rff.f90
@@ -31,7 +31,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5R function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Rff_F03.f90 b/fortran/src/H5Rff_F03.f90
index 88ec8cf..7a9b080 100644
--- a/fortran/src/H5Rff_F03.f90
+++ b/fortran/src/H5Rff_F03.f90
@@ -31,7 +31,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5R function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
@@ -258,9 +258,7 @@ CONTAINS
! name - name of the object at the specified location
! Outputs:
! ref - reference to the specified object
-! hdferr: - error code
-! Success: 0
-! Failure: -1
+! hdferr - returns 0 if successful and -1 if fails
! AUTHOR
! Elena Pourmal
! August 12, 1999
@@ -309,9 +307,7 @@ CONTAINS
! space_id - dataspace identifier that describes selected region
! OUTPUTS
! ref - reference to the dataset region
-! hdferr: - error code
-! Success: 0
-! Failure: -1
+! hdferr - returns 0 if successful and -1 if fails
! AUTHOR
! Elena Pourmal
! August 12, 1999
@@ -376,9 +372,7 @@ CONTAINS
! H5T_STD_REF_DSETREG
! Outputs:
! ref - reference created by the function call.
-! hdferr - error code
-! Success: 0
-! Failure: -1
+! hdferr - returns 0 if successful and -1 if fails.
! OPTIONAL
! space_id - dataspace identifier that describes selected region
!
@@ -425,9 +419,7 @@ CONTAINS
! ref - reference to open
! Outputs:
! obj_id - object_identifier
-! hdferr: - error code
-! Success: 0
-! Failure: -1
+! hdferr - returns 0 if successful and -1 if fails
! AUTHOR
! Elena Pourmal
! August 12, 1999
@@ -465,14 +457,12 @@ CONTAINS
! Opens the dataset region
!
! Inputs:
-! dset_id - identifier of the dataset containing
-! reference to teh regions
-! ref - reference to open
+! dset_id - identifier of the dataset containing
+! reference to teh regions
+! ref - reference to open
! Outputs:
-! obj_id - dataspace identifier
-! hdferr: - error code
-! Success: 0
-! Failure: -1
+! obj_id - dataspace identifier
+! hdferr - returns 0 if successful and -1 if fails
!
! AUTHOR
! Elena Pourmal
@@ -517,9 +507,8 @@ CONTAINS
! ref - Reference to open.
! Outputs:
! ref_obj_id - identifier of referenced object
-! hdferr - error code
-! Success: 0
-! Failure: -1
+! hdferr - returns 0 if successful and -1 if fails
+!
! AUTHOR
! M. Scot Breitenfeld
! June 20, 2008
@@ -553,37 +542,32 @@ CONTAINS
! Retrieves a name of a referenced object.
!
! Inputs:
-! loc_id - Identifier for the dataset containing the reference or for the group that dataset is in.
+! loc_id - Identifier for the file containing the reference or for any object in that file.
! ref - An object or dataset region reference.
!
! Outputs:
! name - A name associated with the referenced object or dataset region.
-!
-! hdferr: - error code
-! Success: 0
-! Failure: -1
+! hdferr - Returns 0 if successful and -1 if fails.
!
! Optional parameters:
-! size - The size of the name buffer.
+! size - The size of the name buffer, returning 0 (zero) if no name is associated
+! with the identifier.
!
! AUTHOR
! M. Scot Breitenfeld
! March 28, 2008
!
-! Signature:S
+! Signature:
SUBROUTINE h5rget_name_object_f(loc_id, ref, name, hdferr, size)
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for the dataset containing the reference
- ! or for the group that dataset is in.
- TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference
- INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! The size of the name buffer,
- ! returning 0 (zero) if no name is associated
- ! with the identifier
- CHARACTER(LEN=*), INTENT(OUT) :: name ! A name associated with the referenced object or dataset region.
- INTEGER, INTENT(OUT) :: hdferr ! Error code
+ INTEGER(HID_T), INTENT(IN) :: loc_id
+ TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref
+ INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size
+ CHARACTER(LEN=*), INTENT(OUT) :: name
+ INTEGER, INTENT(OUT) :: hdferr
!*****
- INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference
+ INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference
INTEGER(SIZE_T) :: size_default
INTEGER(SIZE_T) :: name_len
@@ -595,7 +579,6 @@ CONTAINS
hdferr = h5rget_name_ptr_c(loc_id, 0, f_ptr, name, name_len, size_default)
-
IF(PRESENT(size)) size = size_default
END SUBROUTINE h5rget_name_object_f
@@ -608,18 +591,15 @@ CONTAINS
! Retrieves a name of a dataset region.
!
! Inputs:
-! loc_id - Identifier for the dataset containing the reference or
-! for the group that dataset is in.
+! loc_id - Identifier for the file containing the reference or for any object in that file.
! ref - An object or dataset region reference.
!
! Outputs:
! name - A name associated with the referenced object or dataset region.
-! hdferr - error code
-! Success: 0
-! Failure: -1
+! hdferr - Returns 0 if successful and -1 if fails.
!
! Optional parameters:
-! size - The size of the name buffer.
+! size - The size of the name buffer, returning 0 (zero) if no name is associated with the identifier
!
! AUTHOR
! M. Scot Breitenfeld
@@ -629,13 +609,11 @@ CONTAINS
SUBROUTINE h5rget_name_region_f(loc_id, ref, name, hdferr, size)
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for the dataset containing the reference
- ! or for the group that dataset is in.
- TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference
- INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! The size of the name buffer,
- ! returning 0 (zero) if no name is associated with the identifier
- CHARACTER(LEN=*), INTENT(OUT) :: name ! A name associated with the referenced object or dataset region.
- INTEGER, INTENT(OUT) :: hdferr ! Error code
+ INTEGER(HID_T), INTENT(IN) :: loc_id
+ TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref
+ INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size
+ CHARACTER(LEN=*), INTENT(OUT) :: name
+ INTEGER, INTENT(OUT) :: hdferr
!*****
INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference
INTEGER(SIZE_T) :: size_default
@@ -661,20 +639,17 @@ CONTAINS
! Retrieves a name of a referenced object.
!
! Inputs:
- ! loc_id - Identifier for the dataset containing the reference or
- ! for the group that dataset is in.
+ ! loc_id - Identifier for the file containing the reference or for any object in that file.
! ref_type - Type of reference.
! ref - An object or dataset region reference.
!
! Outputs:
! name - A name associated with the referenced object or dataset ptr.
- !
- ! hdferr - error code
- ! Success: 0
- ! Failure: -1
+ ! hdferr - Returns 0 if successful and -1 if fails.
!
! Optional parameters:
- ! size - The size of the name buffer.
+ ! size - The size of the name buffer, returning 0 (zero) if no name is associated
+ ! with the identifier
!
! AUTHOR
! M. Scot Breitenfeld
@@ -684,15 +659,12 @@ CONTAINS
SUBROUTINE h5rget_name_ptr_f(loc_id, ref_type, ref, name, hdferr, size)
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for the dataset containing the reference
- ! or for the group that dataset is in.
- INTEGER, INTENT(IN) :: ref_type ! Type of reference.
- TYPE(C_PTR), INTENT(IN) :: ref ! An object or dataset region reference.
- CHARACTER(LEN=*), INTENT(OUT) :: name ! A name associated with the referenced object or dataset ptr.
- INTEGER, INTENT(OUT) :: hdferr ! Error code
- INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! The size of the name buffer,
- ! returning 0 (zero) if no name is associated
- ! with the identifier
+ INTEGER(HID_T), INTENT(IN) :: loc_id
+ INTEGER, INTENT(IN) :: ref_type
+ TYPE(C_PTR), INTENT(IN) :: ref
+ CHARACTER(LEN=*), INTENT(OUT) :: name
+ INTEGER, INTENT(OUT) :: hdferr
+ INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size
!*****
INTEGER(SIZE_T) :: size_default
INTEGER(SIZE_T) :: name_len
@@ -727,9 +699,7 @@ CONTAINS
! H5G_DATASET_F 2
! H5G_TYPE_F 3
!
- ! hdferr - error code
- ! Success: 0
- ! Failure: -1
+ ! hdferr - Returns 0 if successful and -1 if fails.
!
! AUTHOR
! M. Scot Breitenfeld
diff --git a/fortran/src/H5Rff_F90.f90 b/fortran/src/H5Rff_F90.f90
index 0190e57..3871d99 100644
--- a/fortran/src/H5Rff_F90.f90
+++ b/fortran/src/H5Rff_F90.f90
@@ -31,7 +31,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5R function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
@@ -386,7 +386,7 @@ CONTAINS
! Retrieves a name of a referenced object.
!
! INPUTS
-! loc_id - Identifier for the dataset containing the reference or for the group that dataset is in.
+! loc_id - Identifier for the file containing the reference or for any object in that file.
! ref - An object or dataset region reference.
!
! OUTPUTS
@@ -397,7 +397,8 @@ CONTAINS
! Failure: -1
!
! OPTIONAL PARAMETERS
-! size - The size of the name buffer.
+! size - The size of the name buffer, returning 0 (zero) if
+! no name is associated with the identifier
!
! AUTHOR
! M. Scot Breitenfeld
@@ -406,7 +407,8 @@ CONTAINS
! SOURCES
SUBROUTINE h5rget_name_object_f(loc_id, ref, name, hdferr, size)
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for the dataset containing the reference
+ INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for the file containing the reference or
+ ! for any object in that file.
! or for the group that dataset is in.
TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference
INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! The size of the name buffer,
@@ -453,8 +455,8 @@ CONTAINS
! Retrieves a name of a dataset region.
!
! INPUTS
-! loc_id - Identifier for the dataset containing the reference or
-! for the group that dataset is in.
+! loc_id - Identifier for the file containing the reference or
+! for any object in that file.
! ref - An object or dataset region reference.
!
! OUTPUTS
@@ -464,7 +466,8 @@ CONTAINS
! Failure: -1
!
! OPTIONAL PARAMETERS
-! size - The size of the name buffer.
+! size - The size of the name buffer, returning 0 (zero) if no
+! name is associated with the identifier
!
! AUTHOR
! M. Scot Breitenfeld
@@ -473,14 +476,11 @@ CONTAINS
! SOURCE
SUBROUTINE h5rget_name_region_f(loc_id, ref, name, hdferr, size)
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for the dataset containing the reference
- ! or for the group that dataset is in.
- TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Object reference
- INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! The size of the name buffer,
- ! returning 0 (zero) if no name is associated
- ! with the identifier
- CHARACTER(LEN=*), INTENT(OUT) :: name ! A name associated with the referenced object or dataset region.
- INTEGER, INTENT(OUT) :: hdferr ! Error code
+ INTEGER(HID_T), INTENT(IN) :: loc_id
+ TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref
+ INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size
+ CHARACTER(LEN=*), INTENT(OUT) :: name
+ INTEGER, INTENT(OUT) :: hdferr
!*****
INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference
INTEGER(SIZE_T) :: size_default
diff --git a/fortran/src/H5Sff.f90 b/fortran/src/H5Sff.f90
index 9ef8ca8..1bae584 100644
--- a/fortran/src/H5Sff.f90
+++ b/fortran/src/H5Sff.f90
@@ -31,7 +31,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5S function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90
index fd857a8..89bd972 100644
--- a/fortran/src/H5Tff.f90
+++ b/fortran/src/H5Tff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5T function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Tff_F03.f90 b/fortran/src/H5Tff_F03.f90
index 902e2ac..d16553a 100644
--- a/fortran/src/H5Tff_F03.f90
+++ b/fortran/src/H5Tff_F03.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5T function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5Tff_F90.f90 b/fortran/src/H5Tff_F90.f90
index 021773d..a95b31f 100644
--- a/fortran/src/H5Tff_F90.f90
+++ b/fortran/src/H5Tff_F90.f90
@@ -30,7 +30,7 @@
!
! *** IMPORTANT ***
! If you add a new H5D function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5Zff.f90 b/fortran/src/H5Zff.f90
index ec68286..7b67b5b 100644
--- a/fortran/src/H5Zff.f90
+++ b/fortran/src/H5Zff.f90
@@ -28,7 +28,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new H5Z function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90
index c51b039..f9c20ac 100644
--- a/fortran/src/H5_ff.f90
+++ b/fortran/src/H5_ff.f90
@@ -30,7 +30,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!
!*****
diff --git a/fortran/src/H5_ff_F03.f90 b/fortran/src/H5_ff_F03.f90
index f3e7098..d418ed5 100644
--- a/fortran/src/H5_ff_F03.f90
+++ b/fortran/src/H5_ff_F03.f90
@@ -27,7 +27,7 @@
! NOTES
! *** IMPORTANT ***
! If you add a new function you must add the function name to the
-! Windows dll file 'hdf5_fortrandll.def' in the fortran/src directory.
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
! This is needed for Windows based operating systems.
!*****
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 9340c2a..4b02b6c 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -93,6 +93,7 @@ typedef struct H5O_info_t_f {
#define nh5fget_obj_count_c H5_FC_FUNC_(h5fget_obj_count_c, H5FGET_OBJ_COUNT_C)
#define nh5fget_obj_ids_c H5_FC_FUNC_(h5fget_obj_ids_c, H5FGET_OBJ_IDS_C)
#define nh5fget_freespace_c H5_FC_FUNC_(h5fget_freespace_c, H5FGET_FREESPACE_C)
+#define nh5fget_file_image_c H5_FC_FUNC_(h5fget_file_image_c, H5FGET_FILE_IMAGE_C)
#define nh5fget_name_c H5_FC_FUNC_(h5fget_name_c, H5FGET_NAME_C)
#define nh5fget_filesize_c H5_FC_FUNC_(h5fget_filesize_c, H5FGET_FILESIZE_C)
@@ -108,6 +109,7 @@ H5_FCDLL int_f nh5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id);
H5_FCDLL int_f nh5fget_obj_count_c (hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count);
H5_FCDLL int_f nh5fget_obj_ids_c (hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f *obj_ids, size_t_f *num_objs);
H5_FCDLL int_f nh5fget_freespace_c (hid_t_f *file_id, hssize_t_f *free_space);
+H5_FCDLL int_f nh5fget_file_image_c(hid_t_f *file_id, void *buf_ptr, size_t_f *buf_len, size_t_f *buf_req);
H5_FCDLL int_f nh5fflush_c (hid_t_f *obj_id, int_f *scope);
H5_FCDLL int_f nh5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen);
H5_FCDLL int_f nh5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size);
@@ -1063,9 +1065,9 @@ H5_FCDLL int_f nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags
H5_FCDLL int_f nh5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters);
H5_FCDLL int_f nh5pget_filter_c(hid_t_f *prp_id, int_f* filter_number, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name, int_f* filter_id);
H5_FCDLL int_f nh5pget_filter_by_id_c(hid_t_f *prp_id, int_f* filter_id, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name);
-H5_FCDLL int_f nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, int_f* offset, hsize_t_f*bytes);
+H5_FCDLL int_f nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes);
H5_FCDLL int_f nh5pget_external_count_c (hid_t_f *prp_id, int_f* count);
-H5_FCDLL int_f nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, int_f* offset, hsize_t_f*bytes);
+H5_FCDLL int_f nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, off_t_f* offset, hsize_t_f*bytes);
H5_FCDLL int_f nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right);
H5_FCDLL int_f nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right);
H5_FCDLL int_f nh5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info);
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index 4c83d21..eb30775 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -321,6 +321,19 @@ int main(void)
return -1;
#endif
+ /* off_t */
+#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_OFF_T >= 8
+ writeToFiles("OFF_T", "off_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_OFF_T >= 4
+ writeToFiles("OFF_T", "off_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_OFF_T >= 2
+ writeToFiles("OFF_T", "off_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_OFF_T >= 1
+ writeToFiles("OFF_T", "off_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+#else
+ /* Error: couldn't find a size for off_t */
+ return -1;
+#endif
/* size_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_SIZE_T >= 8
diff --git a/fortran/src/H5test_kind_SIZEOF.f90 b/fortran/src/H5test_kind_SIZEOF.f90
index ba982ee..867ec1e 100644
--- a/fortran/src/H5test_kind_SIZEOF.f90
+++ b/fortran/src/H5test_kind_SIZEOF.f90
@@ -15,7 +15,9 @@
! NOTES
! This program is used in place of H5test_kind.f90 when the Fortran intrinsic
! function SIZEOF is available. It generates code that makes use of SIZEOF in
-! H5fortran_detect.f90 which is a portable solution.
+! H5fortran_detect.f90 which is a portable solution but is not standard
+! compliant. The program H5test_kind_C_SIZEOF uses F2008 standard intrinsic
+! function instead, which is the preferred method.
!
! The availability of SIZEOF is checked at configure time and the TRUE/FALSE
! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF".
diff --git a/fortran/src/HDF5.f90 b/fortran/src/HDF5.f90
index cb3d8bf..75af333 100644
--- a/fortran/src/HDF5.f90
+++ b/fortran/src/HDF5.f90
@@ -30,6 +30,7 @@
MODULE HDF5
USE H5GLOBAL
USE H5F
+ USE H5F_PROVISIONAL
USE H5G
USE H5E
USE H5E_PROVISIONAL
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index e6ef610..12c38e2 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -76,7 +76,7 @@ libhdf5_fortran_la_SOURCES=H5f90global.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 \
- H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 H5Eff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
+ H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 H5Eff$(F_STATUS).f90 H5Fff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
H5Off$(F_STATUS).f90 H5Pff$(F_STATUS).f90 H5Rff$(F_STATUS).f90 H5Tff$(F_STATUS).f90 $(PARALLEL_COND_SRC)
# HDF5 Fortran library depends on HDF5 Library.
@@ -201,6 +201,7 @@ H5Dff.lo: $(srcdir)/H5Dff.f90 H5f90global.lo
H5Aff$(F_STATUS).lo: $(srcdir)/H5Aff$(F_STATUS).f90 H5f90global.lo
H5Dff$(F_STATUS).lo: $(srcdir)/H5Dff$(F_STATUS).f90 H5f90global.lo
H5Eff$(F_STATUS).lo: $(srcdir)/H5Eff$(F_STATUS).f90 H5f90global.lo
+H5Fff$(F_STATUS).lo: $(srcdir)/H5Fff$(F_STATUS).f90 H5f90global.lo
H5Lff$(F_STATUS).lo: $(srcdir)/H5Lff$(F_STATUS).f90 H5f90global.lo
H5Off$(F_STATUS).lo: $(srcdir)/H5Off$(F_STATUS).f90 H5f90global.lo
H5Pff$(F_STATUS).lo: $(srcdir)/H5Pff$(F_STATUS).f90 H5f90global.lo
@@ -217,11 +218,11 @@ H5Rff.lo: $(srcdir)/H5Rff.f90 H5f90global.lo
H5Sff.lo: $(srcdir)/H5Sff.f90 H5f90global.lo
H5Tff.lo: $(srcdir)/H5Tff.f90 H5f90global.lo
H5Zff.lo: $(srcdir)/H5Zff.f90 H5f90global.lo
-H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo H5Eff$(F_STATUS).lo H5Pff$(F_STATUS).lo
+H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo H5Fff$(F_STATUS).lo H5Eff$(F_STATUS).lo H5Pff$(F_STATUS).lo
HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5_ff$(F_STATUS).lo H5_ff.lo H5Aff.lo H5Aff$(F_STATUS).lo \
H5Dff.lo H5Dff$(F_STATUS).lo \
H5Eff.lo H5Eff$(F_STATUS).lo \
- H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
+ H5Fff.lo H5Fff$(F_STATUS).lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
H5_DBLE_Interface$(F_DBLE).lo
@@ -230,7 +231,7 @@ HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff$(F_STATUS).lo
H5Aff.lo H5Aff$(F_STATUS).lo \
H5Dff.lo H5Dff$(F_STATUS).lo \
H5Eff.lo H5Eff$(F_STATUS).lo \
- H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
+ H5Fff.lo H5Fff$(F_STATUS).lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index c2cd64c..c41653f 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -128,9 +128,10 @@ am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.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 H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 \
- H5Eff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 H5Off$(F_STATUS).f90 \
- H5Pff$(F_STATUS).f90 H5Rff$(F_STATUS).f90 H5Tff$(F_STATUS).f90 \
- HDF5.f90 H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90
+ H5Eff$(F_STATUS).f90 H5Fff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
+ H5Off$(F_STATUS).f90 H5Pff$(F_STATUS).f90 H5Rff$(F_STATUS).f90 \
+ H5Tff$(F_STATUS).f90 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
@@ -141,9 +142,9 @@ am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.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 H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo \
- H5Eff$(F_STATUS).lo H5Lff$(F_STATUS).lo H5Off$(F_STATUS).lo \
- H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Tff$(F_STATUS).lo \
- $(am__objects_1)
+ H5Eff$(F_STATUS).lo H5Fff$(F_STATUS).lo H5Lff$(F_STATUS).lo \
+ H5Off$(F_STATUS).lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo \
+ H5Tff$(F_STATUS).lo $(am__objects_1)
libhdf5_fortran_la_OBJECTS = $(am_libhdf5_fortran_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -319,6 +320,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -370,7 +372,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -517,7 +518,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 127
+LT_VERS_REVISION = 138
LT_VERS_AGE = 0
# Include src directory in both Fortran and C flags (C compiler is used
@@ -556,7 +557,7 @@ libhdf5_fortran_la_SOURCES = H5f90global.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 \
- H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 H5Eff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
+ H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 H5Eff$(F_STATUS).f90 H5Fff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
H5Off$(F_STATUS).f90 H5Pff$(F_STATUS).f90 H5Rff$(F_STATUS).f90 H5Tff$(F_STATUS).f90 $(PARALLEL_COND_SRC)
@@ -1101,6 +1102,7 @@ H5Dff.lo: $(srcdir)/H5Dff.f90 H5f90global.lo
H5Aff$(F_STATUS).lo: $(srcdir)/H5Aff$(F_STATUS).f90 H5f90global.lo
H5Dff$(F_STATUS).lo: $(srcdir)/H5Dff$(F_STATUS).f90 H5f90global.lo
H5Eff$(F_STATUS).lo: $(srcdir)/H5Eff$(F_STATUS).f90 H5f90global.lo
+H5Fff$(F_STATUS).lo: $(srcdir)/H5Fff$(F_STATUS).f90 H5f90global.lo
H5Lff$(F_STATUS).lo: $(srcdir)/H5Lff$(F_STATUS).f90 H5f90global.lo
H5Off$(F_STATUS).lo: $(srcdir)/H5Off$(F_STATUS).f90 H5f90global.lo
H5Pff$(F_STATUS).lo: $(srcdir)/H5Pff$(F_STATUS).f90 H5f90global.lo
@@ -1117,11 +1119,11 @@ H5Rff.lo: $(srcdir)/H5Rff.f90 H5f90global.lo
H5Sff.lo: $(srcdir)/H5Sff.f90 H5f90global.lo
H5Tff.lo: $(srcdir)/H5Tff.f90 H5f90global.lo
H5Zff.lo: $(srcdir)/H5Zff.f90 H5f90global.lo
-H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo H5Eff$(F_STATUS).lo H5Pff$(F_STATUS).lo
+H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo H5Fff$(F_STATUS).lo H5Eff$(F_STATUS).lo H5Pff$(F_STATUS).lo
HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5_ff$(F_STATUS).lo H5_ff.lo H5Aff.lo H5Aff$(F_STATUS).lo \
H5Dff.lo H5Dff$(F_STATUS).lo \
H5Eff.lo H5Eff$(F_STATUS).lo \
- H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
+ H5Fff.lo H5Fff$(F_STATUS).lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
H5_DBLE_Interface$(F_DBLE).lo
@@ -1130,7 +1132,7 @@ HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff$(F_STATUS).lo
H5Aff.lo H5Aff$(F_STATUS).lo \
H5Dff.lo H5Dff$(F_STATUS).lo \
H5Eff.lo H5Eff$(F_STATUS).lo \
- H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
+ H5Fff.lo H5Fff$(F_STATUS).lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index bf7596d..4ce185b 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -228,6 +228,7 @@ H5F_mp_H5FGET_ACCESS_PLIST_F
H5F_mp_H5FIS_HDF5_F
H5F_mp_H5FGET_NAME_F
H5F_mp_H5FGET_FILESIZE_F
+@H5_NOF03EXP@H5F_PROVISIONAL_mp_H5FGET_FILE_IMAGE_F
; H5G
H5G_mp_H5GOPEN_F
H5G_mp_H5GCREATE_F
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 92ba651..5b9ca11 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -105,6 +105,7 @@ IF (HDF5_ENABLE_F2003)
fortranlib_test_F03.f90
tH5F.f90
tH5E_F03.f90
+ tH5F_F03.f90
tH5L_F03.f90
tH5O_F03.f90
tH5P_F03.f90
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index 42dd127..84f55e5 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -68,7 +68,7 @@ fortranlib_test_1_8_SOURCES = fortranlib_test_1_8.f90 \
if FORTRAN_2003_CONDITIONAL_F
fortranlib_test_F03_SOURCES = fortranlib_test_F03.f90 \
- tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90
+ tH5F.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90
endif
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index b9f05e3..6c226bc 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -136,11 +136,12 @@ fortranlib_test_1_8_LDADD = $(LDADD)
fortranlib_test_1_8_DEPENDENCIES = libh5test_fortran.la $(LIBH5TEST) \
$(LIBH5F) $(LIBHDF5)
am__fortranlib_test_F03_SOURCES_DIST = fortranlib_test_F03.f90 \
- tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 \
- tH5T_F03.f90
+ tH5F.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 tH5O_F03.f90 \
+ tH5P_F03.f90 tH5T_F03.f90
@FORTRAN_2003_CONDITIONAL_F_TRUE@am_fortranlib_test_F03_OBJECTS = fortranlib_test_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5E_F03.$(OBJEXT) \
+@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5L_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5O_F03.$(OBJEXT) \
@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5P_F03.$(OBJEXT) \
@@ -304,6 +305,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -355,7 +357,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -527,7 +528,7 @@ fortranlib_test_1_8_SOURCES = fortranlib_test_1_8.f90 \
tH5F.f90 tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90
@FORTRAN_2003_CONDITIONAL_F_TRUE@fortranlib_test_F03_SOURCES = fortranlib_test_F03.f90 \
-@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.f90 tH5E_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90
+@FORTRAN_2003_CONDITIONAL_F_TRUE@ tH5F.f90 tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.f90
fflush1_SOURCES = fflush1.f90
fflush2_SOURCES = fflush2.f90
diff --git a/fortran/test/fortranlib_test_F03.f90 b/fortran/test/fortranlib_test_F03.f90
index a03241c..1d9615f 100644
--- a/fortran/test/fortranlib_test_F03.f90
+++ b/fortran/test/fortranlib_test_F03.f90
@@ -82,6 +82,10 @@ PROGRAM fortranlibtest_F03
CALL write_test_status(ret_total_error, ' Testing writing/reading enum dataset, using C_LOC', total_error)
ret_total_error = 0
+ CALL t_enum_conv(ret_total_error)
+ CALL write_test_status(ret_total_error, ' Testing enumeration conversions', total_error)
+
+ ret_total_error = 0
CALL t_bit(ret_total_error)
CALL write_test_status(ret_total_error, ' Testing writing/reading bitfield dataset, using C_LOC', total_error)
@@ -141,7 +145,10 @@ PROGRAM fortranlibtest_F03
CALL test_nbit(ret_total_error)
CALL write_test_status(ret_total_error, ' Testing nbit filter', total_error)
-
+ ret_total_error = 0
+ CALL external_test_offset(cleanup, ret_total_error)
+ CALL write_test_status(ret_total_error, ' Testing external dataset with offset', total_error)
+
! write(*,*)
! write(*,*) '========================================='
! write(*,*) 'Testing GROUP interface '
@@ -159,6 +166,11 @@ PROGRAM fortranlibtest_F03
CALL obj_info(ret_total_error)
CALL write_test_status(ret_total_error, ' Testing object info functions ', total_error)
+ ret_total_error = 0
+ CALL test_get_file_image(ret_total_error)
+ CALL write_test_status(ret_total_error, ' Testing get file image ', total_error)
+
+
WRITE(*,*)
WRITE(*,*) ' ============================================ '
diff --git a/fortran/test/tH5F_F03.f90 b/fortran/test/tH5F_F03.f90
new file mode 100644
index 0000000..dea9a5d
--- /dev/null
+++ b/fortran/test/tH5F_F03.f90
@@ -0,0 +1,175 @@
+!****h* root/fortran/test/tH5F_F03.f90
+!
+! NAME
+! tH5F_F03.f90
+!
+! FUNCTION
+! Test FORTRAN HDF5 H5F APIs which are dependent on FORTRAN 2003
+! features.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! NOTES
+! Tests the H5F APIs functionalities of:
+! h5fget_file_image_f
+!
+! CONTAINS SUBROUTINES
+! test_get_file_image
+!
+!*****
+
+! *****************************************
+! *** H 5 F T E S T S
+! *****************************************
+
+SUBROUTINE test_get_file_image(total_error)
+ !
+ ! Tests the wrapper for h5fget_file_image
+ !
+ USE HDF5
+ USE ISO_C_BINDING
+
+ IMPLICIT NONE
+
+ INTEGER, INTENT(INOUT) :: total_error ! returns error
+
+ CHARACTER(kind=c_char), ALLOCATABLE, DIMENSION(:), TARGET :: file_image_ptr ! Image from file
+ CHARACTER(kind=c_char), ALLOCATABLE, DIMENSION(:), TARGET :: image_ptr ! Image from h5fget_file_image_f
+
+ INTEGER, DIMENSION(1:100), TARGET :: data ! Write data
+ INTEGER :: i, file_sz
+ INTEGER(hid_t) :: file_id = -1 ! File identifier
+ INTEGER(hid_t) :: dset_id = -1 ! Dataset identifier
+ INTEGER(hid_t) :: space_id = -1 ! Dataspace identifier
+ INTEGER(hsize_t), DIMENSION(1:2) :: dims ! Dataset dimensions
+ INTEGER(size_t) :: itmp_a, itmp_b ! General purpose integers
+ INTEGER(size_t) :: image_size ! Size of image
+ TYPE(C_PTR) :: f_ptr ! Pointer
+ INTEGER(hid_t) :: fapl ! File access property
+ INTEGER :: error ! Error flag
+
+
+ RETURN ! DEBUG, PGI COMPILERS seem to have a bug in the INQUIRE functions,
+ ! waiting for an answer from PGI how to resolve the problem.
+
+ ! Create new properties for file access
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f", error, total_error)
+
+ ! Set standard I/O driver
+ CALL h5pset_fapl_stdio_f(fapl, error)
+ CALL check("h5pset_fapl_stdio_f", error, total_error)
+
+ ! Create the file
+ CALL h5fcreate_f("tget_file_image.h5", H5F_ACC_TRUNC_F, file_id, error, H5P_DEFAULT_F, fapl)
+ CALL check("h5fcreate_f", error, total_error)
+
+ ! Set up data space for new data set
+ dims(1:2) = (/10,10/)
+
+ CALL h5screate_simple_f(2, dims, space_id, error)
+ CALL check("h5screate_simple_f", error, total_error)
+
+ ! Create a dataset
+ CALL h5dcreate_f(file_id, "dset 0", H5T_NATIVE_INTEGER, space_id, dset_id, error)
+ CALL check("h5dcreate_f", error, total_error)
+
+ ! Write some data to the data set
+ DO i = 1, 100
+ data(i) = i
+ ENDDO
+
+ f_ptr = C_LOC(data(1))
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, f_ptr, error)
+ CALL check("h5dwrite_f",error, total_error)
+
+ ! Flush the file
+ CALL h5fflush_f(file_id, H5F_SCOPE_GLOBAL_F, error)
+ CALL check("h5fflush_f",error, total_error)
+
+ ! Open the test file using standard I/O calls
+ OPEN(UNIT=10,FILE='tget_file_image.h5', ACCESS='STREAM')
+ ! Get the size of the test file
+ !
+ ! Since we use the eoa to calculate the image size, the file size
+ ! may be larger. This is OK, as long as (in this specialized instance)
+ ! the remainder of the file is all '\0's.
+ !
+ ! With latest mods to truncate call in core file drive,
+ ! file size should match image size; get the file size
+ INQUIRE(UNIT=10, SIZE=file_sz)
+ CLOSE(UNIT=10)
+
+ ! I. Get buffer size needed to hold the buffer
+
+ ! A. Preferred way to get the size
+ f_ptr = C_NULL_PTR
+ CALL h5fget_file_image_f(file_id, f_ptr, INT(0, size_t), error, image_size)
+ CALL check("h5fget_file_image_f",error, total_error)
+ CALL verify("h5fget_file_image_f", file_sz, INT(image_size), total_error)
+
+ ! B. f_ptr set to point to an incorrect buffer, should pass anyway
+ f_ptr = C_LOC(data(1))
+ itmp_a = 1
+ CALL h5fget_file_image_f(file_id, f_ptr, itmp_a, error, image_size)
+ CALL check("h5fget_file_image_f",error, total_error)
+ CALL VERIFY("h5fget_file_image_f", INT(itmp_a), 1, total_error) ! Routine should not change the value
+ CALL VERIFY("h5fget_file_image_f", file_sz, INT(image_size), total_error)
+
+ ! Allocate a buffer of the appropriate size
+ ALLOCATE(image_ptr(1:image_size))
+
+ ! Load the image of the file into the buffer
+ f_ptr = C_LOC(image_ptr(1)(1:1))
+ CALL h5fget_file_image_f(file_id, f_ptr, image_size, error)
+ CALL check("h5fget_file_image_f",error, total_error)
+
+ ! Close dset and space
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f", error, total_error)
+ CALL h5sclose_f(space_id, error)
+ CALL check("h5sclose_f", error, total_error)
+ ! Close the test file
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f",error, total_error)
+
+ ! Allocate a buffer for the test file image
+ ALLOCATE(file_image_ptr(1:image_size))
+
+ ! Open the test file using standard I/O calls
+ OPEN(UNIT=10,FILE='tget_file_image.h5', ACCESS='STREAM')
+
+ ! Read the test file from disk into the buffer
+ DO i = 1, image_size
+ READ(10) file_image_ptr(i)
+ ENDDO
+
+ CLOSE(10)
+
+ ! verify the file and the image contain the same data
+ DO i = 1, image_size
+ ! convert one byte to an unsigned integer
+ IF( ICHAR(file_image_ptr(i)) .NE. ICHAR(image_ptr(i)))THEN
+ total_error = total_error + 1
+ EXIT
+ ENDIF
+ ENDDO
+
+ ! release resources
+ DEALLOCATE(file_image_ptr,image_ptr)
+
+END SUBROUTINE test_get_file_image
diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.f90
index 3faaac2..4c78334 100644
--- a/fortran/test/tH5P.f90
+++ b/fortran/test/tH5P.f90
@@ -27,385 +27,376 @@
!
!*****
- SUBROUTINE external_test(cleanup, total_error)
+SUBROUTINE external_test(cleanup, total_error)
! This subroutine tests following functionalities:
! h5pset_external_f, h5pget_external_count_f,
! h5pget_external_f
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
-
- CHARACTER(LEN=8), PARAMETER :: filename = "external"
- CHARACTER(LEN=80) :: fix_filename
- INTEGER(HID_T) :: file_id
- INTEGER(HID_T) :: plist_id
- INTEGER(HID_T) :: space_id
- INTEGER(HID_T) :: dataset_id
- INTEGER(HSIZE_T), DIMENSION(1) :: cur_size !data space current size
- INTEGER(HSIZE_T), DIMENSION(1) :: max_size !data space maximum size
- CHARACTER(LEN=256) :: name !external file name
- INTEGER :: file_offset !external file offset
- INTEGER(HSIZE_T) :: file_size !sizeof external file segment
- INTEGER :: error !error code
- INTEGER(SIZE_T) :: int_size !size of integer
- INTEGER(HSIZE_T) :: file_bytes !Number of bytes reserved
- !in the file for the data
- INTEGER :: RANK = 1 !dataset rank
- INTEGER :: count !number of external files for the
- !specified dataset
- INTEGER(SIZE_T) :: namesize
- INTEGER(HSIZE_T) :: size, buf_size
- INTEGER :: idx
-
- buf_size = 4*1024*1024
-
- !
- !Create file "external.h5" using default properties.
- !
- CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
- if (error .ne. 0) then
- write(*,*) "Cannot modify filename"
- stop
- endif
- CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error)
- CALL check("h5fcreate_f",error,total_error)
-
-
- CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, error)
- CALL check("h5pcreate_f", error, total_error)
- CALL h5pset_buffer_f(plist_id, buf_size, error)
- CALL check("h5pset_buffer_f", error, total_error)
- CALL h5pget_buffer_f(plist_id, size, error)
- CALL check("h5pget_buffer_f", error, total_error)
- if (size .ne.buf_size) then
- total_error = total_error + 1
- write(*,*) "h5pget_buffer_f returned wrong size, error"
- endif
- CALL h5pclose_f(plist_id, error)
- CALL check("h5pclose_f", error, total_error)
-
- CALL h5pcreate_f(H5P_DATASET_CREATE_F, plist_id, error)
- CALL check("h5pcreate_f",error,total_error)
- cur_size(1) =100
- max_size(1) = 100;
- call h5tget_size_f(H5T_NATIVE_INTEGER, int_size, error)
- CALL check("h5tget_size_f",error,total_error)
- file_size = int_size * max_size(1);
- CALL h5pset_external_f(plist_id, "ext1.data", 0, file_size, error)
- CALL check("h5pset_external_f",error,total_error)
- CALL h5screate_simple_f(RANK, cur_size, space_id, error, max_size)
- CALL check("h5screate_simple_f", error, total_error)
- CALL h5dcreate_f(file_id, "dset1", H5T_NATIVE_INTEGER, space_id, &
- dataset_id, error, plist_id)
- CALL check("h5dcreate_f", error, total_error)
-
- CALL h5dclose_f(dataset_id, error)
- CALL check("h5dclose_f", error, total_error)
- CALL h5pclose_f(plist_id, error)
- CALL check("h5pclose_f", error, total_error)
- CALL h5sclose_f(space_id, error)
- CALL check("h5sclose_f", error, total_error)
- CALL h5fclose_f(file_id, error)
-
- CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, file_id, error)
- CALL h5dopen_f(file_id, "dset1", dataset_id, error)
- CALL check("h5dopen_f",error,total_error)
-
- ! Read dataset creation information
- CALL h5dget_create_plist_f(dataset_id, plist_id, error)
- CALL check("h5dget_create_plist_f",error,total_error)
- CALL h5pget_external_count_f(plist_id, count, error)
- CALL check("h5pget_external_count_f",error,total_error)
- if(count .ne. 1 ) then
- write (*,*) "got external_count is not correct"
- total_error = total_error + 1
- end if
- namesize = 10
- idx = 0
- CALL h5pget_external_f(plist_id, idx, namesize, name, file_offset, &
- file_bytes, error)
- CALL check("h5pget_external_f",error,total_error)
- if(file_offset .ne. 0 ) then
- write (*,*) "got external file offset is not correct"
- total_error = total_error + 1
- end if
- if(file_bytes .ne. file_size ) then
- write (*,*) "got external file size is not correct"
- total_error = total_error + 1
- end if
-
- CALL h5dclose_f(dataset_id, error)
- CALL check("h5dclose_f", error, total_error)
- CALL h5pclose_f(plist_id, error)
- CALL check("h5pclose_f", error, total_error)
- CALL h5fclose_f(file_id, error)
- CALL check("h5fclose_f", error, total_error)
-
-
- if(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(OUT) :: total_error
+
+ CHARACTER(LEN=8), PARAMETER :: filename = "external"
+ CHARACTER(LEN=80) :: fix_filename
+ INTEGER(HID_T) :: file_id
+ INTEGER(HID_T) :: plist_id
+ INTEGER(HID_T) :: space_id
+ INTEGER(HID_T) :: dataset_id
+ INTEGER(HSIZE_T), DIMENSION(1) :: cur_size !data space current size
+ INTEGER(HSIZE_T), DIMENSION(1) :: max_size !data space maximum size
+ CHARACTER(LEN=256) :: name !external file name
+ INTEGER(OFF_T) :: file_offset !external file offset
+ INTEGER(HSIZE_T) :: file_size !sizeof external file segment
+ INTEGER :: error !error code
+ INTEGER(SIZE_T) :: int_size !size of integer
+ INTEGER(HSIZE_T) :: file_bytes !Number of bytes reserved
+ !in the file for the data
+ INTEGER :: RANK = 1 !dataset rank
+ INTEGER :: count !number of external files for the
+ !specified dataset
+ INTEGER(SIZE_T) :: namesize
+ INTEGER(HSIZE_T) :: size, buf_size
+ INTEGER :: idx
+
+ buf_size = 4*1024*1024
+
+ !
+ !Create file "external.h5" using default properties.
+ !
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ IF (error .NE. 0) THEN
+ STOP "Cannot modify filename"
+ ENDIF
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error)
+ CALL check("h5fcreate_f",error,total_error)
+
+ CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, error)
+ CALL check("h5pcreate_f", error, total_error)
+ CALL h5pset_buffer_f(plist_id, buf_size, error)
+ CALL check("h5pset_buffer_f", error, total_error)
+ CALL h5pget_buffer_f(plist_id, size, error)
+ CALL check("h5pget_buffer_f", error, total_error)
+ IF (size .NE.buf_size) THEN
+ total_error = total_error + 1
+ WRITE(*,*) "h5pget_buffer_f returned wrong size, error"
+ ENDIF
+ CALL h5pclose_f(plist_id, error)
+ CALL check("h5pclose_f", error, total_error)
+
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, plist_id, error)
+ CALL check("h5pcreate_f",error,total_error)
+ cur_size(1) =100
+ max_size(1) = 100
+ CALL h5tget_size_f(H5T_NATIVE_INTEGER, int_size, error)
+ CALL check("h5tget_size_f",error,total_error)
+ file_size = int_size * max_size(1)
+ CALL h5pset_external_f(plist_id, "ext1.data", INT(0,off_t), file_size, error)
+ CALL check("h5pset_external_f",error,total_error)
+ CALL h5screate_simple_f(RANK, cur_size, space_id, error, max_size)
+ CALL check("h5screate_simple_f", error, total_error)
+ CALL h5dcreate_f(file_id, "dset1", H5T_NATIVE_INTEGER, space_id, &
+ dataset_id, error, plist_id)
+ CALL check("h5dcreate_f", error, total_error)
+
+ CALL h5dclose_f(dataset_id, error)
+ CALL check("h5dclose_f", error, total_error)
+ CALL h5pclose_f(plist_id, error)
+ CALL check("h5pclose_f", error, total_error)
+ CALL h5sclose_f(space_id, error)
+ CALL check("h5sclose_f", error, total_error)
+ CALL h5fclose_f(file_id, error)
+
+ CALL h5fopen_f(fix_filename, H5F_ACC_RDWR_F, file_id, error)
+ CALL h5dopen_f(file_id, "dset1", dataset_id, error)
+ CALL check("h5dopen_f",error,total_error)
+
+ ! Read dataset creation information
+ CALL h5dget_create_plist_f(dataset_id, plist_id, error)
+ CALL check("h5dget_create_plist_f",error,total_error)
+ CALL h5pget_external_count_f(plist_id, count, error)
+ CALL check("h5pget_external_count_f",error,total_error)
+ IF(count .NE. 1 ) THEN
+ WRITE (*,*) "got external_count is not correct"
+ total_error = total_error + 1
+ END IF
+ namesize = 10
+ idx = 0
+ CALL h5pget_external_f(plist_id, idx, namesize, name, file_offset, &
+ file_bytes, error)
+ CALL check("h5pget_external_f",error,total_error)
+ IF(file_offset .NE. 0 ) THEN
+ WRITE (*,*) "got external file offset is not correct"
+ total_error = total_error + 1
+ END IF
+ IF(file_bytes .NE. file_size ) THEN
+ WRITE (*,*) "got external file size is not correct"
+ total_error = total_error + 1
+ END IF
+
+ CALL h5dclose_f(dataset_id, error)
+ CALL check("h5dclose_f", error, total_error)
+ CALL h5pclose_f(plist_id, error)
+ CALL check("h5pclose_f", error, total_error)
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f", error, total_error)
+
+ IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ RETURN
+END SUBROUTINE external_test
+
+SUBROUTINE multi_file_test(cleanup, total_error)
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(OUT) :: total_error
+
+ CHARACTER(LEN=9), PARAMETER :: filename = "multidset" ! File name
+ CHARACTER(LEN=80) :: fix_filename
+ CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+ INTEGER(HID_T) :: dspace_id ! Dataspace identifier
+ INTEGER(HID_T) :: dtype_id ! Datatype identifier
+ INTEGER(HID_T) :: fapl, fapl_1 ! File access property list identifier
+ INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_map, memb_map_out
+ INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_fapl, memb_fapl_out
+ CHARACTER(LEN=20), DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_name, memb_name_out
+ REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_addr, memb_addr_out
+ !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F) :: memb_addr
+ LOGICAL :: relax = .TRUE.
+ LOGICAL :: relax_out = .TRUE.
+
+ INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions
+ INTEGER :: rank = 2 ! Dataset rank
+
+ INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers
+ INTEGER :: error ! Error flag
+ INTEGER(HID_T) :: driver
+ INTEGER :: i, j !general purpose integers
+ INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
+ INTEGER :: mdc_nelmts
+ INTEGER(SIZE_T) :: rdcc_nelmts
+ INTEGER(SIZE_T) :: rdcc_nbytes
+ REAL :: rdcc_w0
+ memb_fapl = H5P_DEFAULT_F
+ memb_map = H5FD_MEM_SUPER_F
+ memb_addr = 0.
+ memb_map(H5FD_MEM_SUPER_F) = H5FD_MEM_SUPER_F
+ memb_addr(H5FD_MEM_SUPER_F) = 0.
+ memb_map(H5FD_MEM_BTREE_F) = H5FD_MEM_BTREE_F
+ memb_addr(H5FD_MEM_BTREE_F) = 0.1
+ memb_map(H5FD_MEM_DRAW_F) = H5FD_MEM_DRAW_F
+ memb_addr(H5FD_MEM_DRAW_F) = 0.5
+ memb_map(H5FD_MEM_GHEAP_F) = H5FD_MEM_GHEAP_F
+ memb_addr(H5FD_MEM_GHEAP_F) = 0.2
+ memb_map(H5FD_MEM_LHEAP_F) = H5FD_MEM_LHEAP_F
+ memb_addr(H5FD_MEM_LHEAP_F) = 0.3
+ memb_map(H5FD_MEM_OHDR_F) = H5FD_MEM_OHDR_F
+ memb_addr(H5FD_MEM_OHDR_F) = 0.4
+
+ memb_name = ' '
+ memb_name(H5FD_MEM_SUPER_F) = '%s-s.h5'
+ memb_name(H5FD_MEM_BTREE_F) = '%s-b.h5'
+ memb_name(H5FD_MEM_DRAW_F) = '%s-r.h5'
+ memb_name(H5FD_MEM_GHEAP_F) = '%s-g.h5'
+ memb_name(H5FD_MEM_LHEAP_F) = '%s-l.h5'
+ memb_name(H5FD_MEM_OHDR_F) = '%s-o.h5'
+
+ !
+ ! Initialize the dset_data array.
+ !
+ DO i = 1, 4
+ DO j = 1, 6
+ dset_data(i,j) = (i-1)*6 + j
+ END DO
+ END DO
+
+ !
+ ! Create a new file using default properties.
+ !
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ IF (error .NE. 0) THEN
+ WRITE(*,*) "Cannot modify filename"
+ STOP
+ ENDIF
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f", error, total_error)
+ CALL h5pset_fapl_multi_f(fapl, memb_map, memb_fapl, memb_name, memb_addr, relax, error)
+ CALL check("h5pset_fapl_multi_f", error, total_error)
+ CALL h5pget_fapl_multi_f(fapl, memb_map_out, memb_fapl_out, memb_name_out, &
+ memb_addr_out, relax_out, error)
+ CALL check("h5pget_fapl_multi_f", error, total_error)
+ CALL h5pget_driver_f(fapl, driver, error)
+ CALL check("h5pget_driver_f",error, total_error)
+ IF(driver .NE. H5FD_MULTI_F) THEN
+ WRITE(*,*) "Wrong value for driver"
+ ENDIF
+ !
+ ! Let's check h5pget(set)cache_f APIs here for now
+ !
+ CALL h5pget_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, &
+ rdcc_w0, error)
+ CALL check("h5pget_cache_f", error, total_error)
+
+ !
+ ! Set cache to some number
+ !
+ rdcc_nbytes = 1024*1024
+ CALL h5pset_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, &
+ rdcc_w0, error)
+ CALL check("h5pset_cache_f", error, total_error)
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error, access_prp = fapl)
+ CALL check("h5fcreate_f", error, total_error)
+ IF(error .NE. 0) THEN
+ WRITE(*,*) "Cannot create file using multi-file driver... Exiting...."
+ total_error = 1
+ CALL h5pclose_f(fapl, error)
RETURN
- END SUBROUTINE external_test
-
- SUBROUTINE multi_file_test(cleanup, total_error)
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
- LOGICAL, INTENT(IN) :: cleanup
- INTEGER, INTENT(OUT) :: total_error
-
- CHARACTER(LEN=9), PARAMETER :: filename = "multidset" ! File name
- CHARACTER(LEN=80) :: fix_filename
- CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: dset_id ! Dataset identifier
- INTEGER(HID_T) :: dspace_id ! Dataspace identifier
- INTEGER(HID_T) :: dtype_id ! Datatype identifier
- INTEGER(HID_T) :: fapl, fapl_1 ! File access property list identifier
- INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_map, memb_map_out
- INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_fapl, memb_fapl_out
- CHARACTER(LEN=20), DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_name, memb_name_out
- REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: memb_addr, memb_addr_out
- !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F) :: memb_addr
- LOGICAL :: relax = .TRUE.
- LOGICAL :: relax_out = .TRUE.
-
- INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions
- INTEGER :: rank = 2 ! Dataset rank
-
- INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers
- INTEGER :: error ! Error flag
- INTEGER(HID_T) :: driver
- INTEGER :: i, j !general purpose integers
- INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
- INTEGER :: mdc_nelmts
- INTEGER(SIZE_T) :: rdcc_nelmts
- INTEGER(SIZE_T) :: rdcc_nbytes
- REAL :: rdcc_w0
- memb_fapl = H5P_DEFAULT_F
- memb_map = H5FD_MEM_SUPER_F
- memb_addr = 0.
- memb_map(H5FD_MEM_SUPER_F) = H5FD_MEM_SUPER_F
- memb_addr(H5FD_MEM_SUPER_F) = 0.
- memb_map(H5FD_MEM_BTREE_F) = H5FD_MEM_BTREE_F
- memb_addr(H5FD_MEM_BTREE_F) = 0.1
- memb_map(H5FD_MEM_DRAW_F) = H5FD_MEM_DRAW_F
- memb_addr(H5FD_MEM_DRAW_F) = 0.5
- memb_map(H5FD_MEM_GHEAP_F) = H5FD_MEM_GHEAP_F
- memb_addr(H5FD_MEM_GHEAP_F) = 0.2
- memb_map(H5FD_MEM_LHEAP_F) = H5FD_MEM_LHEAP_F
- memb_addr(H5FD_MEM_LHEAP_F) = 0.3
- memb_map(H5FD_MEM_OHDR_F) = H5FD_MEM_OHDR_F
- memb_addr(H5FD_MEM_OHDR_F) = 0.4
-
- memb_name = ' '
- memb_name(H5FD_MEM_SUPER_F) = '%s-s.h5'
- memb_name(H5FD_MEM_BTREE_F) = '%s-b.h5'
- memb_name(H5FD_MEM_DRAW_F) = '%s-r.h5'
- memb_name(H5FD_MEM_GHEAP_F) = '%s-g.h5'
- memb_name(H5FD_MEM_LHEAP_F) = '%s-l.h5'
- memb_name(H5FD_MEM_OHDR_F) = '%s-o.h5'
-
- !
- ! Initialize the dset_data array.
- !
- do i = 1, 4
- do j = 1, 6
- dset_data(i,j) = (i-1)*6 + j;
- end do
- end do
-
- !
- ! Create a new file using default properties.
- !
- CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
- if (error .ne. 0) then
- write(*,*) "Cannot modify filename"
- stop
- endif
- CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
- CALL check("h5pcreate_f", error, total_error)
- CALL h5pset_fapl_multi_f(fapl, memb_map, memb_fapl, memb_name, memb_addr, relax, error)
- CALL check("h5pset_fapl_multi_f", error, total_error)
- CALL h5pget_fapl_multi_f(fapl, memb_map_out, memb_fapl_out, memb_name_out, &
- memb_addr_out, relax_out, error)
- CALL check("h5pget_fapl_multi_f", error, total_error)
- CALL h5pget_driver_f(fapl, driver, error)
- CALL check("h5pget_driver_f",error, total_error)
- if(driver .ne. H5FD_MULTI_F) then
- write(*,*) "Wrong value for driver"
- endif
- !
- ! Let's check h5pget(set)cache_f APIs here for now
- !
- CALL h5pget_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, &
- rdcc_w0, error)
- CALL check("h5pget_cache_f", error, total_error)
-
-
- ! Set cache to some number
- !
- rdcc_nbytes = 1024*1024
- CALL h5pset_cache_f(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, &
- rdcc_w0, error)
- CALL check("h5pset_cache_f", error, total_error)
- CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file_id, error, access_prp = fapl)
- CALL check("h5fcreate_f", error, total_error)
- if(error .ne. 0) then
- write(*,*) "Cannot create file using multi-file driver... Exiting...."
- total_error = 1
- call h5pclose_f(fapl, error)
- return
- endif
-
- !
- ! Create the dataspace.
- !
- CALL h5screate_simple_f(rank, dims, dspace_id, error)
- CALL check("h5screate_simple_f", error, total_error)
-
-
- !
- ! Create the dataset with default properties.
- !
- CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dspace_id, &
- dset_id, error)
- CALL check("h5dcreate_f", error, total_error)
-
- !
- ! Write the dataset.
- !
- data_dims(1) = 4
- data_dims(2) = 6
- CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error)
- CALL check("h5dwrite_f", error, total_error)
-
-
- !
- ! End access to the dataset and release resources used by it.
- !
- CALL h5dclose_f(dset_id, error)
- CALL check("h5dclose_f", error, total_error)
-
- !
- ! Terminate access to the data space.
- !
- CALL h5sclose_f(dspace_id, error)
- CALL check("h5sclose_f", error, total_error)
-
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
- CALL check("h5fclose_f", error, total_error)
- CALL h5pclose_f(fapl, error)
- CALL check("h5pclose_f", error, total_error)
- !
- ! Open the existing file.
- !
- CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
- CALL check("h5pcreate_f", error, total_error)
- CALL h5pset_fapl_multi_f(fapl, relax, error)
- CALL check("h5pset_fapl_multi_f", error, total_error)
- CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error, access_prp = fapl)
- CALL check("h5fopen_f", error, total_error)
- !
- CALL h5fget_access_plist_f(file_id, fapl_1, error)
- CALL check("h5fget_access_plist_f", error, total_error)
- !It doesn't work on Windows.
- !CALL h5pget_fapl_multi_f(fapl_1, memb_map_out, memb_fapl_out, memb_name_out, &
- ! memb_addr_out, relax_out, error)
- ! write(*,*) memb_map_out
- ! write(*,*) memb_fapl_out
- ! write(*,*) memb_name_out
- ! write(*,*) memb_addr_out
- ! CALL check("h5pget_fapl_multi_f", error, total_error)
-
- !
- ! Open the existing dataset.
- !
- CALL h5dopen_f(file_id, dsetname, dset_id, error)
- CALL check("h5dopen_f", error, total_error)
-
- !
- ! Get the dataset type.
- !
- CALL h5dget_type_f(dset_id, dtype_id, error)
- CALL check("h5dget_type_f", error, total_error)
-
- !
- ! Get the data space.
- !
- CALL h5dget_space_f(dset_id, dspace_id, error)
- CALL check("h5dget_space_f", error, total_error)
-
- !
- ! Read the dataset.
- !
- CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error)
- CALL check("h5dread_f", error, total_error)
-
- !
- !Compare the data.
- !
- do i = 1, 4
- do j = 1, 6
- IF (data_out(i,j) .NE. dset_data(i, j)) THEN
- write(*, *) "dataset test error occured"
- write(*,*) "data read is not the same as the data writen"
- END IF
- end do
- end do
-
- !
- ! End access to the dataset and release resources used by it.
- !
- CALL h5dclose_f(dset_id, error)
- CALL check("h5dclose_f", error, total_error)
-
- !
- ! Terminate access to the data space.
- !
- CALL h5sclose_f(dspace_id, error)
- CALL check("h5sclose_f", error, total_error)
-
- !
- ! Terminate access to the data type.
- !
- CALL h5tclose_f(dtype_id, error)
- CALL check("h5tclose_f", error, total_error)
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
- CALL check("h5fclose_f", error, total_error)
- CALL h5pclose_f(fapl, error)
- CALL check("h5pclose_f", error, total_error)
- CALL h5pclose_f(fapl_1, error)
- CALL check("h5pclose_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
-
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-b', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-g', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-l', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-o', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-r', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
- IF(cleanup) CALL h5_cleanup_f(filename//'.h5-s', H5P_DEFAULT_F, error)
- CALL check("h5_cleanup_f", error, total_error)
-
- RETURN
- END SUBROUTINE multi_file_test
+ ENDIF
+ !
+ ! Create the dataspace.
+ !
+ CALL h5screate_simple_f(rank, dims, dspace_id, error)
+ CALL check("h5screate_simple_f", error, total_error)
+ !
+ ! Create the dataset with default properties.
+ !
+ CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dspace_id, &
+ dset_id, error)
+ CALL check("h5dcreate_f", error, total_error)
+ !
+ ! Write the dataset.
+ !
+ data_dims(1) = 4
+ data_dims(2) = 6
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error)
+ CALL check("h5dwrite_f", error, total_error)
+ !
+ ! End access to the dataset and release resources used by it.
+ !
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ !
+ ! Terminate access to the data space.
+ !
+ CALL h5sclose_f(dspace_id, error)
+ CALL check("h5sclose_f", error, total_error)
+
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f", error, total_error)
+ CALL h5pclose_f(fapl, error)
+ CALL check("h5pclose_f", error, total_error)
+ !
+ ! Open the existing file.
+ !
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL check("h5pcreate_f", error, total_error)
+ CALL h5pset_fapl_multi_f(fapl, relax, error)
+ CALL check("h5pset_fapl_multi_f", error, total_error)
+ CALL h5fopen_f (fix_filename, H5F_ACC_RDWR_F, file_id, error, access_prp = fapl)
+ CALL check("h5fopen_f", error, total_error)
+ !
+ CALL h5fget_access_plist_f(file_id, fapl_1, error)
+ CALL check("h5fget_access_plist_f", error, total_error)
+ !It doesn't work on Windows.
+ !CALL h5pget_fapl_multi_f(fapl_1, memb_map_out, memb_fapl_out, memb_name_out, &
+ ! memb_addr_out, relax_out, error)
+ ! write(*,*) memb_map_out
+ ! write(*,*) memb_fapl_out
+ ! write(*,*) memb_name_out
+ ! write(*,*) memb_addr_out
+ ! CALL check("h5pget_fapl_multi_f", error, total_error)
+
+ !
+ ! Open the existing dataset.
+ !
+ CALL h5dopen_f(file_id, dsetname, dset_id, error)
+ CALL check("h5dopen_f", error, total_error)
+
+ !
+ ! Get the dataset type.
+ !
+ CALL h5dget_type_f(dset_id, dtype_id, error)
+ CALL check("h5dget_type_f", error, total_error)
+
+ !
+ ! Get the data space.
+ !
+ CALL h5dget_space_f(dset_id, dspace_id, error)
+ CALL check("h5dget_space_f", error, total_error)
+
+ !
+ ! Read the dataset.
+ !
+ CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error)
+ CALL check("h5dread_f", error, total_error)
+
+ !
+ !Compare the data.
+ !
+ DO i = 1, 4
+ DO j = 1, 6
+ IF (data_out(i,j) .NE. dset_data(i, j)) THEN
+ WRITE(*, *) "dataset test error occured"
+ WRITE(*,*) "data read is not the same as the data writen"
+ END IF
+ END DO
+ END DO
+
+ !
+ ! End access to the dataset and release resources used by it.
+ !
+ CALL h5dclose_f(dset_id, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ !
+ ! Terminate access to the data space.
+ !
+ CALL h5sclose_f(dspace_id, error)
+ CALL check("h5sclose_f", error, total_error)
+
+ !
+ ! Terminate access to the data type.
+ !
+ CALL h5tclose_f(dtype_id, error)
+ CALL check("h5tclose_f", error, total_error)
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+ CALL check("h5fclose_f", error, total_error)
+ CALL h5pclose_f(fapl, error)
+ CALL check("h5pclose_f", error, total_error)
+ CALL h5pclose_f(fapl_1, error)
+ CALL check("h5pclose_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-b', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-g', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-l', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-o', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-r', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ IF(cleanup) CALL h5_cleanup_f(filename//'.h5-s', H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+
+ RETURN
+END SUBROUTINE multi_file_test
!-------------------------------------------------------------------------
! Function: test_chunk_cache
@@ -432,24 +423,24 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
IMPLICIT NONE
LOGICAL, INTENT(IN) :: cleanup
INTEGER, INTENT(OUT) :: total_error
-
+
CHARACTER(LEN=14), PARAMETER :: filename="chunk_cache"
CHARACTER(LEN=80) :: fix_filename
- INTEGER(hid_t) :: fid = -1 ! /* File ID */
+ INTEGER(hid_t) :: fid = -1 ! File ID
INTEGER(hid_t) :: file
- INTEGER(hid_t) :: fapl_local = -1 ! /* Local fapl */
- INTEGER(hid_t) :: fapl_def = -1 ! /* Default fapl */
- INTEGER(hid_t) :: dcpl = -1 !/* Dataset creation property list ID */
- INTEGER(hid_t) :: dapl1 = -1 !/* Dataset access property list ID */
- INTEGER(hid_t) :: dapl2 = -1 !/* Dataset access property list ID */
- INTEGER(hid_t) :: sid = -1 !/* Dataspace ID */
- INTEGER(hid_t) :: dsid = -1 !/* Dataset ID */
- INTEGER(hsize_t), DIMENSION(1:1) :: chunk_dim, NDIM = (/100/) !/* Dataset and chunk dimensions */
- INTEGER(size_t) :: nslots_1, nslots_2, nslots_3, nslots_4 !/* rdcc number of elements */
- INTEGER(size_t) :: nbytes_1, nbytes_2, nbytes_3, nbytes_4 !/* rdcc number of bytes */
+ INTEGER(hid_t) :: fapl_local = -1 ! Local fapl
+ INTEGER(hid_t) :: fapl_def = -1 ! Default fapl
+ INTEGER(hid_t) :: dcpl = -1 ! Dataset creation property list ID
+ INTEGER(hid_t) :: dapl1 = -1 ! Dataset access property list ID
+ INTEGER(hid_t) :: dapl2 = -1 ! Dataset access property list ID
+ INTEGER(hid_t) :: sid = -1 ! Dataspace ID
+ INTEGER(hid_t) :: dsid = -1 ! Dataset ID
+ INTEGER(hsize_t), DIMENSION(1:1) :: chunk_dim, NDIM = (/100/) ! Dataset and chunk dimensions
+ INTEGER(size_t) :: nslots_1, nslots_2, nslots_3, nslots_4 ! rdcc number of elements
+ INTEGER(size_t) :: nbytes_1, nbytes_2, nbytes_3, nbytes_4 ! rdcc number of bytes
INTEGER :: mdc_nelmts
- INTEGER(size_t) ::nlinks !/* Number of link traversals */
- REAL :: w0_1, w0_2, w0_3, w0_4; !/* rdcc preemption policy */
+ INTEGER(size_t) ::nlinks ! Number of link traversals
+ REAL :: w0_1, w0_2, w0_3, w0_4 ! rdcc preemption policy
INTEGER :: error
INTEGER(size_t) rdcc_nelmts
INTEGER(size_t) rdcc_nbytes
@@ -462,7 +453,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
STOP
ENDIF
- !/* Create a default fapl and dapl */
+ ! Create a default fapl and dapl
CALL H5Pcreate_f(H5P_FILE_ACCESS_F, fapl_def, error)
CALL check("H5Pcreate_f", error, total_error)
CALL H5Pcreate_f(H5P_DATASET_ACCESS_F, dapl1, error)
@@ -481,7 +472,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
- ! /* Set a lapl property on dapl1 (to verify inheritance) */
+ ! Set a lapl property on dapl1 (to verify inheritance)
CALL H5Pset_nlinks_f(dapl1, 134_size_t , error)
CALL check("H5Pset_nlinks_f", error, total_error)
CALL H5Pget_nlinks_f(dapl1, nlinks, error)
@@ -494,7 +485,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
! Turn off the chunk cache, so all the chunks are immediately written to disk
CALL H5Pget_cache_f(fapl_local, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, error)
CALL check("H5Pget_cache_f", error, total_error)
- rdcc_nbytes = 0;
+ rdcc_nbytes = 0
CALL H5Pset_cache_f(fapl_local, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, error)
CALL check("H5Pset_cache_f", error, total_error)
@@ -506,29 +497,29 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL H5Pset_cache_f(fapl_local, 0, nslots_2, nbytes_2, w0_2, error)
CALL check("H5Pset_cache_f", error, total_error)
- !/* Create file */
+ ! Create file
CALL H5Fcreate_f(fix_filename, H5F_ACC_TRUNC_F, fid, error, H5P_DEFAULT_F, fapl_local)
CALL check("H5Fcreate_f", error, total_error)
- !/* Create dataset creation property list */
+ ! Create dataset creation property list
CALL H5Pcreate_f(H5P_DATASET_CREATE_F, dcpl, error)
CALL check("H5Pcreate_f", error, total_error)
- !/* Set chunking */
- chunk_dim(1) = 10;
+ ! Set chunking
+ chunk_dim(1) = 10
CALL H5Pset_chunk_f(dcpl, 1, chunk_dim, error)
CALL check("H5Pset_chunk_f", error, total_error)
- !/* Create 1-D dataspace */
+ ! Create 1-D dataspace
ndim(1) = 100
CALL H5Screate_simple_f(1, ndim, sid, error)
CALL check("H5Pcreate_f", error, total_error)
- ! /* Create dataset with default dapl */
+ ! Create dataset with default dapl
CALL H5Dcreate_f(fid, "dset", H5T_NATIVE_INTEGER, sid, dsid, error, dcpl, H5P_DEFAULT_F, dapl1)
CALL check("H5Pcreate_f", error, total_error)
- ! /* Retrieve dapl from dataset, verify cache values are the same as on fapl_local */
+ ! Retrieve dapl from dataset, verify cache values are the same as on fapl_local
CALL H5Dget_access_plist_f(dsid, dapl2, error)
CALL check("H5Dget_access_plist_f", error, total_error)
CALL H5Pget_chunk_cache_f(dapl2, nslots_4, nbytes_4, w0_4, error)
@@ -538,7 +529,8 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
IF(w0_2.NE.w0_4)THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error)
! Set new values on dapl1. nbytes will be set to default, so the file
! property will override this setting
@@ -550,7 +542,7 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL H5Pset_chunk_cache_f(dapl1, nslots_3, nbytes_3, w0_3, error)
CALL check("H5Pset_chunk_cache_f", error, total_error)
- ! Close dataset, reopen with dapl1. Note the use of a dapl with H5Oopen */
+ ! Close dataset, reopen with dapl1. Note the use of a dapl with H5Oopen
CALL H5Dclose_f(dsid, error)
CALL H5Oopen_f(fid, "dset", dsid, error, dapl1)
@@ -569,10 +561,12 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
IF(w0_3.NE.w0_4)THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f4", .TRUE., .FALSE., total_error)
ENDIF
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error)
! Close dataset, reopen with H5P_DEFAULT as dapl
- CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error)
+ CALL H5Dclose_f(dsid, error)
+ CALL check("H5Dclose_f", error, total_error)
CALL H5Oopen_f(fid, "dset", dsid, error)
CALL check("H5Oopen_f", error, total_error)
@@ -587,10 +581,12 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
IF(w0_2.NE.w0_4)THEN
CALL VERIFYlogical("H5Pget_chunk_cache_f", .TRUE., .FALSE., total_error)
ENDIF
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error)
! Similary, test use of H5Dcreate2 with H5P_DEFAULT
- CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error)
+ CALL H5Dclose_f(dsid, error)
+ CALL check("H5Dclose_f", error, total_error)
CALL H5Dcreate_f(fid, "dset2", H5T_NATIVE_INTEGER, sid, dsid, error, dcpl, H5P_DEFAULT_F, H5P_DEFAULT_F)
CALL check("H5Pcreate_f", error, total_error)
@@ -615,8 +611,10 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
! Close and reopen file with new fapl_local
- CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error)
- CALL H5Fclose_f(fid,error); CALL check("h5fclose_f", error, total_error)
+ CALL H5Dclose_f(dsid, error)
+ CALL check("H5Dclose_f", error, total_error)
+ CALL H5Fclose_f(fid,error)
+ CALL check("h5fclose_f", error, total_error)
CALL H5Fopen_f (fix_filename, H5F_ACC_RDWR_F, fid, error, fapl_local)
CALL check("h5fopen_f", error, total_error)
@@ -628,7 +626,8 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL h5dopen_f (fid, "dset", dsid, error, dapl2)
CALL check("h5dopen_f", error, total_error)
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error) ! Close dapl2, to avoid id leak
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error) ! Close dapl2, to avoid id leak
CALL H5Dget_access_plist_f(dsid, dapl2, error)
CALL check("H5Dget_access_plist_f", error, total_error)
@@ -647,11 +646,13 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
CALL H5Pset_chunk_cache_f(dapl2, nslots_2, nbytes_2, w0_2, error)
CALL check("H5Pset_chunk_cache_f", error, total_error)
- CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error)
+ CALL H5Dclose_f(dsid, error)
+ CALL check("H5Dclose_f", error, total_error)
CALL h5dopen_f (fid, "dset", dsid, error, dapl2)
CALL check("h5dopen_f", error, total_error)
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error)
CALL H5Dget_access_plist_f(dsid, dapl2, error)
CALL check("H5Dget_access_plist_f", error, total_error)
@@ -665,17 +666,24 @@ SUBROUTINE test_chunk_cache(cleanup, total_error)
! Close
- CALL H5Dclose_f(dsid, error); CALL check("H5Dclose_f", error, total_error)
- CALL H5Sclose_f(sid,error); CALL check("H5Sclose_f", error, total_error)
- CALL H5Pclose_f(fapl_local,error); CALL check("H5Pclose_f", error, total_error)
- CALL H5Pclose_f(fapl_def,error); CALL check("H5Pclose_f", error, total_error)
- CALL H5Pclose_f(dapl1,error); CALL check("H5Pclose_f", error, total_error)
- CALL H5Pclose_f(dapl2,error); CALL check("H5Pclose_f", error, total_error)
- CALL H5Pclose_f(dcpl,error); CALL check("H5Pclose_f", error, total_error)
- CALL H5Fclose_f(fid,error); CALL check("H5Fclose_f", error, total_error)
+ CALL H5Dclose_f(dsid, error)
+ CALL check("H5Dclose_f", error, total_error)
+ CALL H5Sclose_f(sid,error)
+ CALL check("H5Sclose_f", error, total_error)
+ CALL H5Pclose_f(fapl_local,error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(fapl_def,error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl1,error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dapl2,error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Pclose_f(dcpl,error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Fclose_f(fid,error)
+ CALL check("H5Fclose_f", error, total_error)
IF(cleanup) CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
CALL check("h5_cleanup_f", error, total_error)
END SUBROUTINE test_chunk_cache
-
diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.f90
index aec8a26..02ca9dc 100644
--- a/fortran/test/tH5P_F03.f90
+++ b/fortran/test/tH5P_F03.f90
@@ -362,3 +362,144 @@ SUBROUTINE test_genprop_class_callback(total_error)
CALL check("h5pclose_class_f", error, total_error)
END SUBROUTINE test_genprop_class_callback
+
+!-------------------------------------------------------------------------
+! Function: external_test_offset
+!
+! Purpose: Tests APIs:
+! h5pset_external_f (with offsets not equal to zero), h5pget_external_f
+!
+! Return: Success: 0
+! Failure: -1
+!
+! FORTRAN Programmer: M. Scot Breitenfeld
+! January 10, 2012
+!-------------------------------------------------------------------------
+!
+SUBROUTINE external_test_offset(cleanup,total_error)
+
+ USE ISO_C_BINDING
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+ INTEGER, INTENT(OUT) :: total_error
+ LOGICAL, INTENT(IN) :: cleanup
+
+ INTEGER(hid_t) :: fapl=-1 ! file access property list
+ INTEGER(hid_t) :: file=-1 ! file to write to
+ INTEGER(hid_t) :: dcpl=-1 ! dataset creation properties
+ INTEGER(hid_t) :: space=-1 ! data space
+ INTEGER(hid_t) :: dset=-1 ! dataset
+ INTEGER(hid_t) :: grp=-1 ! group to emit diagnostics
+ INTEGER(size_t) :: i, j ! miscellaneous counters
+ CHARACTER(LEN=180) :: filename ! file names
+ INTEGER, DIMENSION(1:25) :: part ! raw data buffers
+ INTEGER, DIMENSION(1:100), TARGET :: whole ! raw data buffers
+ INTEGER(hsize_t), DIMENSION(1:1) :: cur_size ! current data space size
+ INTEGER(hid_t) :: hs_space ! hyperslab data space
+ INTEGER(hsize_t), DIMENSION(1:1) :: hs_start = (/30/) ! hyperslab starting offset
+ INTEGER(hsize_t), DIMENSION(1:1) :: hs_count = (/25/) ! hyperslab size
+ CHARACTER(LEN=1) :: ichr1 ! character conversion holder
+ INTEGER :: error ! error status
+ TYPE(C_PTR) :: f_ptr ! fortran pointer
+
+ CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:30) :: temparray
+
+ temparray(1:30)(1:1) = '0' ! 1 byte character
+
+ ! Write the data to external files directly
+ DO i = 1, 4
+ DO j = 1, 25
+ part(j) = (i-1)*25+(j-1)
+ ENDDO
+ WRITE(ichr1,'(I1.1)') i
+ filename = "extern_"//ichr1//"a.raw"
+ OPEN(10, FILE=filename, ACCESS='STREAM', form='UNFORMATTED')
+
+ WRITE(10) temparray(1:(i-1)*10)
+ WRITE(10) part
+ CLOSE(10)
+ ENDDO
+ !
+ ! Create the file and an initial group.
+ CALL h5pcreate_f(H5P_FILE_ACCESS_F, fapl, error)
+ CALL h5fcreate_f('extren_raw.h5', H5F_ACC_TRUNC_F, file, error, access_prp=fapl)
+ CALL check("h5fcreate_f",error,total_error)
+
+ CALL h5gcreate_f(file, "emit-diagnostics", grp, error)
+ CALL check("h5gcreate_f",error, total_error)
+
+ ! Create the dataset
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, dcpl, error)
+ CALL check("h5pcreate_f", error, total_error)
+ CALL h5pset_external_f(dcpl, "extern_1a.raw", INT(0,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL check("h5pset_external_f",error,total_error)
+ CALL h5pset_external_f(dcpl, "extern_2a.raw", INT(10,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL check("h5pset_external_f",error,total_error)
+ CALL h5pset_external_f(dcpl, "extern_3a.raw", INT(20,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL check("h5pset_external_f",error,total_error)
+ CALL h5pset_external_f(dcpl, "extern_4a.raw", INT(30,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL check("h5pset_external_f",error,total_error)
+
+ cur_size(1) = 100
+ CALL h5screate_simple_f(1, cur_size, space, error)
+ CALL check("h5screate_simple_f", error, total_error)
+ CALL h5dcreate_f(file, "dset1", H5T_NATIVE_INTEGER, space, dset,error,dcpl_id=dcpl)
+ CALL check("h5dcreate_f", error, total_error)
+
+ !
+ ! Read the entire dataset and compare with the original
+ whole(:) = 0
+ f_ptr = C_LOC(whole(1))
+ CALL h5dread_f(dset, H5T_NATIVE_INTEGER, f_ptr, error, mem_space_id=space, file_space_id=space)
+ CALL check("h5dread_f", error, total_error)
+
+ DO i = 1, 100
+ IF(whole(i) .NE. i-1)THEN
+ WRITE(*,*) "Incorrect value(s) read."
+ total_error = total_error + 1
+ EXIT
+ ENDIF
+ ENDDO
+ !
+ ! Read the middle of the dataset
+ CALL h5scopy_f(space, hs_space, error)
+ CALL check("h5scopy_f", error, total_error)
+ CALL h5sselect_hyperslab_f(hs_space, H5S_SELECT_SET_F, hs_start, hs_count, error)
+ CALL check("h5sselect_hyperslab_f", error, total_error)
+
+ whole(:) = 0
+ f_ptr = C_LOC(whole(1))
+ CALL h5dread_f(dset, H5T_NATIVE_INTEGER, f_ptr, error, mem_space_id=hs_space, file_space_id=hs_space)
+ CALL check("h5dread_f", error, total_error)
+
+ CALL h5sclose_f(hs_space, error)
+ CALL check("h5sclose_f", error, total_error)
+ DO i = hs_start(1)+1, hs_start(1)+hs_count(1)
+ IF(whole(i) .NE. i-1)THEN
+ WRITE(*,*) "Incorrect value(s) read."
+ total_error = total_error + 1
+ EXIT
+ ENDIF
+ ENDDO
+
+ CALL h5dclose_f(dset, error)
+ CALL check("h5dclose_f", error, total_error)
+ CALL h5pclose_f(dcpl, error)
+ CALL check("h5pclose_f", error, total_error)
+ CALL h5sclose_f(space, error)
+ CALL check("h5sclose_f", error, total_error)
+ CALL h5fclose_f(file, error)
+ CALL check("h5fclose_f", error, total_error)
+
+ ! cleanup
+ DO i = 1, 4
+ WRITE(ichr1,'(I1.1)') i
+ filename = "extern_"//ichr1//"a.raw"
+ CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+ ENDDO
+ IF(cleanup) CALL h5_cleanup_f("extren_raw.h5", H5P_DEFAULT_F, error)
+ CALL check("h5_cleanup_f", error, total_error)
+
+END SUBROUTINE external_test_offset
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90
index 1c4da8b..f7efcc4 100644
--- a/fortran/test/tH5T_F03.f90
+++ b/fortran/test/tH5T_F03.f90
@@ -405,7 +405,7 @@ END SUBROUTINE test_array_compound_atomic
CALL check("h5tarray_create_f", error, total_error)
! Insert character array field
- CALL h5tinsert_f(tid2, "c", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%c(1))), tid4, error)
+ CALL h5tinsert_f(tid2, "c", H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%c(1)(1:1))), tid4, error)
CALL check("h5tinsert2_f", error, total_error)
! Close array of floats field datatype
@@ -551,7 +551,7 @@ END SUBROUTINE test_array_compound_atomic
CALL H5Tget_member_offset_f(tid2, 2, off, error)
CALL check("H5Tget_member_offset_f", error, total_error)
CALL VERIFY("H5Tget_member_offset_f",INT(off),&
- INT(H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%c(1)))), total_error)
+ INT(H5OFFSETOF(C_LOC(wdata(1,1)),C_LOC(wdata(1,1)%c(1)(1:1)))), total_error)
! Check the 3rd field's datatype
CALL H5Tget_member_type_f(tid2, 2, mtid2, error)
@@ -1028,8 +1028,8 @@ END SUBROUTINE test_array_compound_atomic
INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) !should map to INTEGER*4 on most modern processors
INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(Fortran_INTEGER_8) !should map to INTEGER*8 on most modern processors
- INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors
- INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(Fortran_REAL_8) !should map to REAL*8 on most modern processors
+ INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors
+ INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(Fortran_REAL_8) !should map to REAL*8 on most modern processors
CHARACTER(LEN=12), PARAMETER :: filename = "dsetf_F03.h5" ! File name
CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name
@@ -1710,7 +1710,7 @@ SUBROUTINE t_opaque(total_error)
!
CALL h5dcreate_f(file, dataset, dtype, space, dset, error)
CALL check("h5dcreate_f",error, total_error)
- f_ptr = C_LOC(wdata(1))
+ f_ptr = C_LOC(wdata(1)(1:1))
CALL h5dwrite_f(dset, dtype, f_ptr, error)
CALL check("h5dwrite_f",error, total_error)
!
@@ -1774,7 +1774,7 @@ SUBROUTINE t_opaque(total_error)
!
! Read the data.
!
- f_ptr = C_LOC(rdata(1))
+ f_ptr = C_LOC(rdata(1)(1:1))
CALL h5dread_f(dset, dtype, f_ptr, error)
CALL check("H5Dread_f",error, total_error)
!
@@ -2123,7 +2123,7 @@ SUBROUTINE t_regref(total_error)
CALL h5screate_simple_f(1, dims3, memspace, error)
CALL check("h5screate_simple_f",error, total_error)
- f_ptr = C_LOC(rdata2(1))
+ f_ptr = C_LOC(rdata2(1)(1:1))
CALL h5dread_f( dset2, H5T_NATIVE_INTEGER_1, f_ptr, error, memspace, space)
CALL check("H5Dread_f",error, total_error)
CALL verifystring("h5dread_f",rdata2(1)(1:npoints),TRIM(chrref_correct(i)), total_error)
@@ -2473,24 +2473,24 @@ SUBROUTINE t_vlstring_readwrite(total_error)
! Initialize array of C pointers
- wdata(1) = C_LOC(A(1))
- wdata(2) = C_LOC(B(1))
- wdata(3) = C_LOC(C(1))
- wdata(4) = C_LOC(D(1))
+ wdata(1) = C_LOC(A(1)(1:1))
+ wdata(2) = C_LOC(B(1)(1:1))
+ wdata(3) = C_LOC(C(1)(1:1))
+ wdata(4) = C_LOC(D(1)(1:1))
data_w(1) = A(1)
data_w(2) = B(1)
data_w(3) = C(1)
data_w(4) = D(1)
- wdata2D(1,1) = C_LOC(A11(1))
- wdata2D(1,2) = C_LOC(A12(1))
- wdata2D(1,3) = C_LOC(A13(1))
- wdata2D(1,4) = C_LOC(A14(1))
- wdata2D(2,1) = C_LOC(A21(1))
- wdata2D(2,2) = C_LOC(A22(1))
- wdata2D(2,3) = C_LOC(A23(1))
- wdata2D(2,4) = C_LOC(A24(1))
+ wdata2D(1,1) = C_LOC(A11(1)(1:1))
+ wdata2D(1,2) = C_LOC(A12(1)(1:1))
+ wdata2D(1,3) = C_LOC(A13(1)(1:1))
+ wdata2D(1,4) = C_LOC(A14(1)(1:1))
+ wdata2D(2,1) = C_LOC(A21(1)(1:1))
+ wdata2D(2,2) = C_LOC(A22(1)(1:1))
+ wdata2D(2,3) = C_LOC(A23(1)(1:1))
+ wdata2D(2,4) = C_LOC(A24(1)(1:1))
data2D_w(1,1) = A11(1)
data2D_w(1,2) = A12(1)
@@ -3092,3 +3092,350 @@ SUBROUTINE test_nbit(cleanup, total_error )
END SUBROUTINE test_nbit
+SUBROUTINE t_enum_conv(total_error)
+
+!-------------------------------------------------------------------------
+! Subroutine: t_enum_conv
+!
+! Purpose: Tests converting data from enumeration datatype
+! to numeric (integer or floating-point number)
+! datatype. Tests various KINDs of INTEGERs
+! and REALs. Checks reading enum data into
+! INTEGER and REAL KINDs.
+!
+! Return: Success: 0
+! Failure: number of errors
+!
+! Programmer: M. Scot Breitenfeld
+! October 27, 2012
+!
+! Note: Adapted from C test (enum.c -- test_conv)
+! No reliance on C tests.
+!-------------------------------------------------------------------------
+!
+ USE HDF5
+ USE ISO_C_BINDING
+
+ IMPLICIT NONE
+
+ INTEGER, INTENT(INOUT) :: total_error
+
+ INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(Fortran_INTEGER_4) !should map to INTEGER*4 on most modern processors
+ INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(Fortran_INTEGER_8)!should map to INTEGER*8 on most modern processors
+
+ INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_4) !should map to REAL*4 on most modern processors
+
+ INTEGER(hid_t) :: cwg=-1, dtype=-1, space=-1, dset=-1, memtype ! Handles
+ INTEGER(hid_t) :: file ! Handles
+
+ ! Enumerated type
+ ENUM, BIND(C)
+ ENUMERATOR :: E1_RED, E1_GREEN, E1_BLUE, E1_WHITE, E1_BLACK
+ END ENUM
+
+ INTEGER :: val
+
+ ! Enumerated data array
+ ! Some values are out of range for testing. The library should accept them
+ INTEGER(KIND(E1_RED)), DIMENSION(1:20), TARGET :: data1 = (/E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE,&
+ E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED,&
+ E1_RED, E1_BLUE, E1_GREEN, E1_BLACK, E1_WHITE,&
+ E1_RED, E1_WHITE, INT(0,KIND(E1_RED)), INT(-1,KIND(E1_RED)), INT(-2,KIND(E1_RED))/)
+
+ ! Reading array for enum data
+ INTEGER(KIND(E1_RED)), DIMENSION(1:20), TARGET :: data2
+
+ ! Reading array's for converted enum data
+ INTEGER(C_SHORT), DIMENSION(1:20), TARGET :: data_short
+ INTEGER(C_INT), DIMENSION(1:20), TARGET :: data_int
+ REAL(C_DOUBLE), DIMENSION(1:20), TARGET :: data_double
+
+ INTEGER(int_kind_8), DIMENSION(1:20), TARGET :: data_i8
+ INTEGER(int_kind_16), DIMENSION(1:20), TARGET :: data_i16
+ REAL(real_kind_7), DIMENSION(1:20), TARGET :: data_r7
+
+ INTEGER(hsize_t), DIMENSION(1:1) :: ds_size = (/20/)
+ INTEGER(size_t) :: i
+ INTEGER :: error
+ TYPE(C_PTR) :: f_ptr
+ INTEGER(HID_T) :: m_baset ! Memory base type
+ !
+ ! Create a new file using the default properties.
+ !
+ CALL h5fcreate_f("enum1.h5", H5F_ACC_TRUNC_F, file, error)
+ CALL check("h5fcreate_f", error, total_error)
+ !
+ ! Create a new group using the default properties.
+ !
+ CALL h5gcreate_f(file, "test_conv", cwg, error)
+ CALL check("h5gcreate_f",error, total_error)
+ !
+ ! Create a enum type
+ !
+ CALL H5Tcreate_f(H5T_ENUM_F, H5OFFSETOF(C_LOC(data1(1)), C_LOC(data1(2))), dtype, error)
+ CALL check("h5tcreate_f",error, total_error)
+ !
+ ! Initialize enum data.
+ !
+ val = E1_RED
+ CALL H5Tenum_insert_f(dtype, "RED", val, error)
+ CALL check("h5tenum_insert_f",error, total_error)
+ val = E1_GREEN
+ CALL H5Tenum_insert_f(dtype, "GREEN", val, error)
+ CALL check("h5tenum_insert_f",error, total_error)
+ val = E1_BLUE
+ CALL H5Tenum_insert_f(dtype, "BLUE", val, error)
+ CALL check("h5tenum_insert_f",error, total_error)
+ val = E1_WHITE
+ CALL H5Tenum_insert_f(dtype, "WHITE", val, error)
+ CALL check("h5tenum_insert_f",error, total_error)
+ val = E1_BLACK
+ CALL H5Tenum_insert_f(dtype, "BLACK", val, error)
+ CALL check("h5tenum_insert_f",error, total_error)
+ !
+ ! Create dataspace. Setting maximum size to be the current size.
+ !
+ CALL h5screate_simple_f(1, ds_size, space, error)
+ CALL check("h5screate_simple_f", error, total_error)
+
+ ! ***************************************
+ ! * Dataset of enumeration type
+ ! ***************************************
+ !
+ ! Create a dataset of enum type and write enum data to it
+
+ CALL h5dcreate_f(cwg, "color_table1", dtype, space, dset, error)
+ CALL check("h5dcreate_f", error, total_error)
+
+ f_ptr = C_LOC(data1(1))
+ CALL h5dwrite_f(dset, dtype, f_ptr, error, space, space)
+ CALL check(" h5dwrite_f", error, total_error)
+
+ ! Test reading back the data with no conversion
+
+ f_ptr = C_LOC(data2(1))
+ CALL h5dread_f(dset, dtype, f_ptr, error, space, space)
+ CALL check(" h5dread_f", error, total_error)
+
+ ! Check values
+ DO i = 1, ds_size(1)
+ IF(data1(i) .NE. data2(i))THEN
+ total_error = total_error + 1
+ WRITE(*,'(" 1. data1(",I0,")=",I0," .NE. data2(",I0,")=",I0)') i, data1(i),i,data2(i)
+ EXIT
+ ENDIF
+ ENDDO
+
+ ! Test converting the data to integer (KIND=C_SHORT). Read enum data back as integer
+ m_baset = h5kind_to_type(KIND(data_short(1)), H5_INTEGER_KIND) ! Memory base type
+ f_ptr = C_LOC(data_short(1))
+ CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
+ CALL check("h5dread_f", error, total_error)
+ ! Check values
+ DO i = 1, ds_size(1)
+ IF(data1(i) .NE. data_short(i))THEN
+ total_error = total_error + 1
+ WRITE(*,'(" 2. data1(",I0,")=",I0," .NE. data_short(",I0,")=",I0)') i, data1(i),i,data_short(i)
+ EXIT
+ ENDIF
+ ENDDO
+
+ ! Test converting the data to (KIND=C_double) number.
+ ! Read enum data back as (KIND=C_double) number
+
+ m_baset = h5kind_to_type(KIND(data_double(1)), H5_REAL_KIND) ! Memory base type
+ f_ptr = C_LOC(data_double(1))
+ CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
+ CALL check("h5dread_f", error, total_error)
+ ! Check values
+ DO i = 1, ds_size(1)
+ IF(data1(i) .NE. INT(data_double(i)))THEN
+ total_error = total_error + 1
+ WRITE(*,'(" 3. data_double(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') &
+ i, INT(data1(i)), i, INT(data_double(i))
+ EXIT
+ ENDIF
+ ENDDO
+
+ ! Test converting the data to (SELECTED_INT_KIND(Fortran_INTEGER_4)) number.
+ ! Read enum data back as (SELECTED_INT_KIND(Fortran_INTEGER_4)) number
+
+ m_baset = h5kind_to_type(int_kind_8, H5_INTEGER_KIND) ! Memory base type
+ f_ptr = C_LOC(data_i8(1))
+ CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
+ CALL check("h5dread_f", error, total_error)
+ ! Check values
+ DO i = 1, ds_size(1)
+ IF(data1(i) .NE. INT(data_i8(i)))THEN
+ total_error = total_error + 1
+ WRITE(*,'(" 4. data_i8(",I0,")=",I0," .NE. data_i8(",I0,")=",I0)') &
+ i, INT(data1(i)), i, INT(data_i8(i))
+ EXIT
+ ENDIF
+ ENDDO
+
+ ! Test converting the data to (SELECTED_INT_KIND(Fortran_INTEGER_8)) number.
+ ! Read enum data back as (SELECTED_INT_KIND(Fortran_INTEGER_8)) number
+
+ m_baset = h5kind_to_type(int_kind_16, H5_INTEGER_KIND) ! Memory base type
+ f_ptr = C_LOC(data_i16(1))
+ CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
+ CALL check("h5dread_f", error, total_error)
+ ! Check values
+ DO i = 1, ds_size(1)
+ IF(data1(i) .NE. INT(data_i16(i)))THEN
+ total_error = total_error + 1
+ WRITE(*,'(" 5. data_i16(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') &
+ i, INT(data1(i)), i, INT(data_i16(i))
+ EXIT
+ ENDIF
+ ENDDO
+
+ ! Test converting the data to SELECTED_REAL_KIND(Fortran_REAL_4) number.
+ ! Read enum data back as SELECTED_REAL_KIND(Fortran_REAL_4) number
+
+ m_baset = h5kind_to_type(KIND(data_r7(1)), H5_REAL_KIND) ! Memory base type
+ f_ptr = C_LOC(data_r7(1))
+ CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
+ CALL check("h5dread_f", error, total_error)
+ ! Check values
+ DO i = 1, ds_size(1)
+ IF(data1(i) .NE. INT(data_r7(i)))THEN
+ total_error = total_error + 1
+ WRITE(*,'(" 6. data_r7(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') &
+ i, INT(data1(i)), i, INT(data_r7(i))
+ EXIT
+ ENDIF
+ ENDDO
+
+ CALL h5dclose_f(dset, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ ! ***************************************
+ ! * Dataset of C_int type
+ ! ***************************************
+
+ ! Create a integer dataset of KIND=C_INT and write enum data to it
+ m_baset = h5kind_to_type(KIND(data_int(1)), H5_INTEGER_KIND) ! Memory base type
+ CALL h5dcreate_f(cwg, "color_table2", m_baset, space, dset, error)
+ CALL check("h5dcreate_f", error, total_error)
+
+ ! Write the enum data
+ f_ptr = C_LOC(data1(1))
+ CALL h5dwrite_f(dset, dtype, f_ptr, error, space, space)
+ CALL check("h5dwrite_f", error, total_error)
+
+ ! Test reading back the data with no conversion
+ f_ptr = C_LOC(data_int(1))
+ CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
+ CALL check("h5dread_f", error, total_error)
+
+ DO i = 1, ds_size(1)
+ IF(data1(i) .NE. data_int(i))THEN
+ total_error = total_error + 1
+ WRITE(*,'(" 7. data1(",I0,")=",I0," .NE. data_int(",I0,")=",I0)') i, data1(i),i,data_int(i)
+ EXIT
+ ENDIF
+ ENDDO
+ CALL h5dclose_f(dset, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ !**************************************
+ !* Dataset of C_double type
+ !**************************************
+
+ ! Create a dataset of KIND=C_DOUBLE and write enum data to it
+ m_baset = h5kind_to_type(KIND(data_double(1)), H5_REAL_KIND) ! Memory base type
+ CALL h5dcreate_f(cwg, "color_table3", m_baset, space, dset, error)
+ CALL check("h5dcreate_f", error, total_error)
+
+ f_ptr = C_LOC(data1(1))
+ CALL h5dwrite_f(dset, dtype, f_ptr, error, space, space)
+ CALL check("h5dwrite_f", error, total_error)
+
+ ! Test reading back the data with no conversion
+ f_ptr = C_LOC(data_double(1))
+ CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
+ CALL check("h5dread_f", error, total_error)
+
+ DO i = 1, ds_size(1)
+ IF(data1(i) .NE. INT(data_double(i)))THEN
+ total_error = total_error + 1
+ WRITE(*,'(" 8. data1(",I0,")=",I0," .NE. data_double(",I0,")=",I0)') i, data1(i),i,INT(data_double(i))
+ EXIT
+ ENDIF
+ ENDDO
+ CALL h5dclose_f(dset, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ !*********************************************************
+ !* Dataset of real SELECTED_REAL_KIND(Fortran_REAL_4) type
+ !*********************************************************
+
+ ! Create a dataset of SELECTED_REAL_KIND(Fortran_REAL_4) and write enum data to it
+ m_baset = h5kind_to_type(KIND(data_r7(1)), H5_REAL_KIND) ! Memory base type
+ CALL h5dcreate_f(cwg, "color_table4", m_baset, space, dset, error)
+ CALL check("h5dcreate_f", error, total_error)
+
+ f_ptr = C_LOC(data1(1))
+ CALL h5dwrite_f(dset, dtype, f_ptr, error, space, space)
+ CALL check("h5dwrite_f", error, total_error)
+
+ ! Test reading back the data with no conversion
+ f_ptr = C_LOC(data_r7(1))
+ CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
+ CALL check("h5dread_f", error, total_error)
+
+ DO i = 1, ds_size(1)
+ IF(data1(i) .NE. INT(data_r7(i)))THEN
+ total_error = total_error + 1
+ WRITE(*,'(" 9. data1(",I0,")=",I0," .NE. data_r7(",I0,")=",I0)') i, data1(i),i,INT(data_r7(i))
+ EXIT
+ ENDIF
+ ENDDO
+ CALL h5dclose_f(dset, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ ! *****************************************************************
+ ! * Dataset of integer SELECTED_INT_KIND(Fortran_INTEGER_8) type
+ ! *****************************************************************
+
+ ! Create a integer dataset of (SELECTED_INT_KIND(Fortran_INTEGER_8)) and write enum data to it
+ m_baset = h5kind_to_type(KIND(data_i16(1)), H5_INTEGER_KIND) ! Memory base type
+ CALL h5dcreate_f(cwg, "color_table5", m_baset, space, dset, error)
+ CALL check("h5dcreate_f", error, total_error)
+
+ ! Write the enum data
+ f_ptr = C_LOC(data1(1))
+ CALL h5dwrite_f(dset, dtype, f_ptr, error, space, space)
+ CALL check("h5dwrite_f", error, total_error)
+
+ ! Test reading back the data with no conversion
+ f_ptr = C_LOC(data_i16(1))
+ CALL h5dread_f(dset, m_baset, f_ptr, error, space, space)
+ CALL check("h5dread_f", error, total_error)
+
+ DO i = 1, ds_size(1)
+ IF(data1(i) .NE. data_i16(i))THEN
+ total_error = total_error + 1
+ WRITE(*,'(" 10. data1(",I0,")=",I0," .NE. data_i16(",I0,")=",I0)') i, data1(i),i,data_i16(i)
+ EXIT
+ ENDIF
+ ENDDO
+ CALL h5dclose_f(dset, error)
+ CALL check("h5dclose_f", error, total_error)
+
+ !
+ ! Close and release resources.
+ !
+ CALL h5sclose_f(space, error)
+ CALL check("H5Sclose_f", error, total_error)
+ CALL h5tclose_f(dtype, error)
+ CALL check("H5Tclose_f", error, total_error)
+ CALL h5gclose_f(cwg, error)
+ CALL check("h5gclose_f",error, total_error)
+ CALL h5fclose_f(file, error)
+ CALL check("H5Fclose_f", error, total_error)
+
+END SUBROUTINE t_enum_conv
+
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index b112db3..1c7248c 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran)
#-----------------------------------------------------------------------------
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index 1cbc87e..9a93367 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -229,6 +229,7 @@ H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@
+HAVE_PTHREAD = @HAVE_PTHREAD@
HDF5_HL = @HDF5_HL@
HDF5_INTERFACES = @HDF5_INTERFACES@
HDF_CXX = @HDF_CXX@
@@ -280,7 +281,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
-PTHREAD = @PTHREAD@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@